Possible duplicate:
An underscore property name prefix in Objective-C
I am a C / C ++ developer and am learning Objective-C. I recently started with a tutorial that I found online. The code is as follows:
@interface MapDemoAnnotation : NSObject <MKAnnotation> { CLLocationCoordinate2D _coordinate; } - (id)initWithCoordinate:(CLLocationCoordinate2D)coordinate; @end @implementation MapDemoAnnotation @synthesize coordinate=_coordinate; - (id)initWithCoordinate:(CLLocationCoordinate2D)coordinate { self = [super init]; if (self != nil) { _coordinate = coordinate; } return self; } @end
Can someone explain to me the meaning of the statement
@synthesize coordinate=_coordinate;
I know the meaning of @synthesize . But he could not understand the complete statement. _coordinate is a member variable. But what is coordinate ? Where is it announced?
Nir
source share