What name does the auto-generated ivar take when I just declare a property in XCode 4.5 onwards?

后端 未结 1 487
没有蜡笔的小新
没有蜡笔的小新 2020-12-12 05:32

Earlier I was on XCode 4.2 for a long time on Snow Leopard for a long time. I have made a straight jump to Mountain Lion with XCode 4.5 on with iOS 6 SDK and ARC.

A

相关标签:
1条回答
  • 2020-12-12 06:00

    The automatically generated @synthesize statement uses instance variables prepended with an underscore:

    @synthesize abc = _abc;
    

    But an explicit @synthesize statement without instance variable

    @synthesize abc;
    

    is still equivalent to

    @synthesize abc = abc;
    

    for compatibility with older Xcode versions.

    0 讨论(0)
提交回复
热议问题