Property and synthesize in iOS
19,208
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.
Related videos on Youtube
Author by
cyclingIsBetter
Updated on June 04, 2022Comments
-
cyclingIsBetter almost 2 years
Possible Duplicate:
@property @synthesizeWhen must I use property and synthesize for an element as NSArray, NSSTring....or IBOutelt as UIButton or UITextFiled?
-
jscs almost 13 years
-
Zut over 11 years@Mat "This site is not a substitute for the vast amounts of documentation on objective-c already available through search engines." Well, this is currently the first hit on google for "iOs synthesize", so you should post an answer instead of a comment, or you comment will contradict itself =)
-
-
Taiko over 9 yearsAnd @synthesize means the getters and setters are automatically generated.