Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
September 20, 2018, 12:36:36 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register Chat  
Pages: [1]   Go Down
  Print  
Author Topic: Informal protocols and exercise 3  (Read 2119 times)
MarkReid
Full Member
***
Posts: 173


« on: October 13, 2009, 09:31:48 AM »

I'm just working through exercise 3 and have a couple questions regarding informal protocols.

Since I'm not using all the methods do I need to include them all in my @interface section or just the ones I want to use? If I were to use all the methods in a subclass of Fraction would I need to list them all in that instance or list them as I am here in the subclasses @interface section only without needing to define them in Fraction previously?

Thanks
« Last Edit: October 13, 2009, 10:06:18 AM by MarkReid » Logged
MarkReid
Full Member
***
Posts: 173


« Reply #1 on: October 16, 2009, 05:11:21 AM »

I made it through this section in the end but would still appreciate an answer if anyone has one?

Cheers
Logged
skochan
Administrator
Hero Member
*****
Posts: 3114



« Reply #2 on: October 19, 2009, 11:04:03 AM »

Mark,

You can just list the methods you intend to implement.  Since it's a category, you don't need to implement all the ones you list either.   If you don't you'll just get a warning message from the compiler.

Cheers,

Steve Kochan

Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents ゥ 2009 classroomM.com. All rights reserved.