I'm learning Objective-C through Cocoa (And loving it). I'm following a tutorial. Theres a class called Menu and the interface looks something like this.
@interface Menu: MenuObject {}
@end
@interface MenuLayer : LayerObject {}
-(void) someMethod:(id)sender
-(void) someOtherMethod:(id)sender
@end
and the implementations follow the same convention
@implementation Menu
-(id)init{
// blah blah blah
}
@end
@implementation MenuLayer
// init, someMethod and someOtherMethod stuff here
@end
Which to me looks like two separate object/classes being defined and implemented in the same files. Is there a reason for doing this? Would the result be the same if I split the .h and .m files up into Menu.h/.m and MenuLayer.h/.m ? Or am I misunderstanding something fundamental?