What are @synthesize and @dynamic in Objective-C?
Essence
Both directives answer "where do the getter/setter for this @property come from".
@synthesize name = _name;— the compiler generates the ivar_nameand the accessors according to the property attributes (copy,atomic,getter=).@dynamic name;— the compiler generates nothing and does not complain about missing accessors: you promise they will appear at runtime (viaresolveInstanceMethod:/class_addMethod, forwarding) or in a superclass.
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep