Wednesday, January 28, 2015

"dynamic" keyword ?

tells the compiler that the getter and setter methods are implemented not by the class itself but somewhere else (like the superclass  will be provided at runtime). Used in CoreData
Uses for @dynamic are e.g. with subclasses of NSManagedObject (CoreData) or when you want to create an outlet for a property defined by a superclass that was not defined as an outlet.
Super class:
@property (nonatomic, retain) NSButton *someButton;
...
@synthesize someButton;
Subclass:
@property (nonatomic, retain) IBOutlet NSButton *someButton;
...

@dynamic someButton;

0 comments:

Post a Comment

About

Blog Archive

Powered by Blogger.

Blog Archive