cancel
Showing results for 
Search instead for 
Did you mean: 
JamesPro
Member
Status: New

A category that is not named has been discarded now that @protocol has been expanded to support the @optional methods. Class Extensions @interface Foo() is designed so that we can declare an another private API-- SPI, or system program interface (SPI)--that is used to implement the class internals. This is typically at the uppermost part of the .m file. Any methods or properties declared within the class extension need to be implemented within the @implementation. Just like the methods and properties found in the public @interface. Class extensions may also be utilized to redefine a Read-only property as read/write prior to doing a @synthesize operation on the accessors. admin omegle ometv Example:

Foo.h
@interface Foo:NSObject
@ property(readonly, copy) NSString *bar;
-(void) publicSaucing;
@end
Foo.m
@interface Foo()


@ property(readwrite, copy) NSString *bar;
- (void) superSecretInternalSaucing;
@end
@implementation Foo
@synthesize bar;
.... must implement the two methods or compiler will warn ....
@end