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

前端 未结 10 1250
伪装坚强ぢ
伪装坚强ぢ 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:27

    The name of the member starting with new is what triggers the warning. Change the name to editedTitle and the warning will go away. I was unable to find documentation confirming this but through testing was able to determine that member variables that begin with 'new' aggravate the compiler.

提交回复
热议问题