When I define a new class inheriting from NSObject:
@interface Photo : NSObject
{
NSString* caption;
NSString* photographer;
}
@property NSString* caption;
@property NSString* photographer;
@end
are all the class methods (like alloc) in NSObject inherited by the new class Photo?
Yes,
Photocan use any method/property/ivar/etc (except for those iVars declared@private) of aNSObjectwhen you subclassNSObject:More about
@private-> SO Question: what-does-private-mean-in-objective-cNSObjectClass Reference