property's synthesized getter follows Cocoa naming convention for returning 'owned' objects

穆飞星
2023-12-01

You own any object you create

You create an object using a method whose name begins with “alloc”, “new”, “copy”, or “mutableCopy” (for example, allocnewObject, or mutableCopy).

一定要注意命名规范,不能以alloc,new,copy,mutableCopy 作为开头命名,比如:newPassword, 

 类似资料:

相关阅读

相关文章

相关问答