When exactly do I have to add @property (nonatomic, retain)
and @synthesize
? Also, when is declaring IBOutlet someObject
enough? How i
property is needed only when you need the access to the member variables through the objects of that particular class. If you want to change some label's text at run time, that too accessing the object of the View Controller, then only you will need to have property defined for it, else not.
Outlet is just to make connection between an object from xib and a member from the class. If you want to give access to that member though object write property for it, else not.
Have a look at this