I'm starting out on objective-C and so far I was under the belief that the .h and .m file should be in sync with-respect-to method details. However it seems I can add methods to the .m file without the addition of their sig in the .h file and it will still compile fine !
For e.g. this works in the .m file without any declaration in the AddressCard.h file.
-(BOOL) isEqual:(AddressCard *)theCard
{
if ([self.name isEqualToString:theCard.name]==YES &&
[self.email isEqualToString: theCard.email] ==YES)
return YES;
return NO;
}
-(NSComparisonResult) compareNames:(AddressCard *)theCard
{
return [self.name compare:theCard.name]; //default is ascending
}
Am'I missing something here. ??