I’ve noticed in some of the examples ive seen that you will set a engine( class variable ) to a _engine ( ivar ). I don’t get it. What’s going on here?
Here is an example of what I’m saying:
@synthesize engine = _engine, delegate = _delegate
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.
This syntax maps a property to an instance variable (ivar) with a different name.
So:
will create property accessor methods that access the _engine ivar instead of engine. You can still access the propery as:
More info in the Apple developer documentation on properties (section Property Implementation Directives)