Possible Duplicate:
Properties and Instance Variables in Objective-C 2.0
What is the difference when I use @property and @synthesize in first case, and @property and @synthesize and also declare same instance variable? Because both seem to work.
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.
There is no difference: the instance variable that you declare will be used, and its ARC properties will be overridden by these of your declared
@property.Declaring an instance variable for a property that you intend to
@synthesizeis best avoided. If you prefer an instance variable with a different name, you can use the synthesize syntax with the ivar name: