@property and @synthesize

后端 未结 2 1526
别跟我提以往
别跟我提以往 2020-12-03 22:09

I\'m very new to Objective C. (Two days now). When read about @synthesize, it seemed to overlap with my understanding @property (which I thought

2条回答
  •  渐次进展
    2020-12-03 23:14

    @property declares a property on your class with whatever atomicity and setter semantics you provide.

    With Xcode 4.4, autosynthesis is available wherein you are provided with a backing ivar from your property without declaring it in @synthesize. This ivar has the form of _propertyName where your property name is propertyName.

提交回复
热议问题