Semantic Issue: Property's synthesized getter follows Cocoa naming convention for returning 'owned' objects

前端 未结 10 1241
伪装坚强ぢ
伪装坚强ぢ 2020-12-07 06:54

I\'m currently using the iOS 5 SDK trying to develop my app. I\'m trying to make an NSString a property, and then to synthesize it in the .m file (I have done this before wi

10条回答
  •  臣服心动
    2020-12-07 07:19

    Unacceptable Object Names

    • newButton
    • copyLabel
    • allocTitle

    Acceptable Object Names

    • neueButton
    • mCopyLabel
    • _allocTitle

    #arc #auto-synthesized #xcode-4.6.1

    ** EDIT **

    Apparently you can't use mutableCopy either.

提交回复
热议问题