Possible Duplicate:
Synthesized property and variable with underscore prefix: what does this mean?
I’ve seen both of these in code; what’s the difference?
@synthesize fooBar;
@synthesize fooBar=_fooBar;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
@synthesize fooBar;creates accessors for the propertyfooBarusing an instance variable with the same name for storage, while the=_fooBartells the compiler to use the instance variable named_fooBaras storage instead. You don’t need to use the=...if you have your instance variables and properties identically named, and you do otherwise.