Confusion about @synthesize in Objective C
Members - Reputation: 108
Posted 27 July 2009 - 06:21 AM
Senior Moderators - Reputation: 9585
Posted 27 July 2009 - 06:39 AM
Unfortunately, up until properties came along, there was no uniform interface between plain instance variables, and those which required effects, so accessor methods were often written for *every* instance variable - just for convenience.
@synthesise just creates accessor methods which do nothing (beside setting the named instance variable), so that they will work the same as custom accessors.
Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]
Members - Reputation: 118
Posted 27 July 2009 - 11:57 AM