Property and synthesize in iOS [duplicate]
Possible Duplicate:
@property @synthesize 开发者_如何学JAVA
When must I use property and synthesize for an element as NSArray, NSSTring....or IBOutelt as UIButton or UITextFiled?
A property is used mainly when other objects need to change or access the ivars in your object. Without manually defining getters and setters, or using @property, other objects can't see or change the ivars. Properties are also often used for convenience of memory management, assisting you in preventing memory leaks.
精彩评论