Why do @synthesize variable names begin with an _?
- by mcjoejoe0911
I'm just starting to use Objective-C and I need to clarify something
When I @synthesize a @property, it is common convention to do the following:
@interface Class : ParentClass
@property propertyName
@end
@implementation
@synthesize propertyName = _propertyName;
@end
I've seen plenty of questions and answers suggesting that "_propertyName" is widely accepted as the "correct" way to synthesize properties. However, does it serve ANY purpose? Or is it merely to increase readability and identify instance variables?