When to use instance variables and when to use properties

前端 未结 4 1801
Happy的楠姐
Happy的楠姐 2020-12-14 13:41

When using Objective-C properties can you stop creating instance variables altogether or do explicit instance variables (not the ones synthesized by the properties) still se

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-14 14:09

    This question was addressed before here

    When you use synthesize the instance variables are handled and instantiated for you. If you're using Lion with the new version of XCode also take a look at the various properties in ARC in Transitioning to ARC

提交回复
热议问题