3 ms·
No you don't. You get warnings about not responding to the method if you put the method implementation after it is used. If it is before, it works fine. Example
by Zev 16y ago
No you don't. You get warnings about not responding to the method if you put the method implementation after it is used. If it is before, it works fine. Example implementation:
@implementation SomeClass
- (void) foo { [self baz]; } // a warning will occur; the compiler doesn't know about - baz yet.
- (void) bar { [self foo]; } // a warning will not occur; the compiler knows about - foo already.
- (void) baz { NSLog(@"bzz"); } // doesn't do anything special
@end