objective C underscore property vs self

前端 未结 4 1421
伪装坚强ぢ
伪装坚强ぢ 2021-01-04 00:28

I\'m was playing around with the standard sample split view that gets created when you select a split view application in Xcode, and after adding a few fields i needed to ad

4条回答
  •  独厮守ぢ
    2021-01-04 00:38

    _property means you are directly accessing the property.

    self.property means you are using accessors.

    In your case, in the setter method you are calling it, creating a recursive call.

提交回复
热议问题