@synthesize and @dynamic

You do not have to write @synthesize for properties. You use it only when you want to change the ivar of the property. Compiler automatically assigns ivars for properties with a underscore preceding property name.

If you create accessors of a property at run time and do not want compiler to automatically create for you, you mark property with @dynamic keyword. For example NSManagedObject creates accessors at runtime.

Leave a comment