Let's say i have a class definition header file like this :
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (readonly, strong, nonatomic) SomeObject *managedObject;
@end
instead of defining the @synthesize on managedObject to create the getters/setters a friend of mine told me i can do the following header definition using a class extension to do the synthesis more cleanly:
#import "TSPAppDelegate.h"
@interface TSPAppDelegate () //notice the class extension here
@property (strong, nonatomic) SomeObject *managedObject; //this will already be synthesized since its an extension
@end
Could some one explain how this works using the extensions ?