Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
March 16, 2018, 09:01:22 PM *
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
Author Topic: Informal protocols and exercise 3  (Read 1943 times)
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?

« Last Edit: October 13, 2009, 10:06:18 AM by MarkReid » Logged
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?

Hero Member
Posts: 3114

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


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.


Steve Kochan

Pages: [1]   Go Up
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 All rights reserved.