property's synthesized getter follows Cocoa naming convention for returning 'owned' objects
2013-04-01 17:18
316 查看
违犯了ARC命名规则,成员变量不要以new,copy作为前缀。
关于ARC规则,请参考http://mobile.51cto.com/iphone-313122.htm
基本的ARC使用规则:
1。代码中不能使用retain, release, retain, autorelease
2。不重载dealloc(如果是释放对象内存以外的处理,是可以重载该函数的,但是不能调用[super dealloc])
3。不能使用NSAllocateObject, NSDeallocateObject
4。不能在C结构体中使用对象指针
5。id与void *间的如果cast时需要用特定的方法(__bridge关键字)
6 。不能使用NSAutoReleasePool、而需要@autoreleasepool块
7 。不能使用“new” "copy"开始的属性名称 (如果使用会有下面的编译错误”Property’s synthesized getter follows Cocoa naming convention for returning ‘owned’ objects”)
例如:newName,copyName都是错误的,违反了第7条
关于ARC规则,请参考http://mobile.51cto.com/iphone-313122.htm
基本的ARC使用规则:
1。代码中不能使用retain, release, retain, autorelease
2。不重载dealloc(如果是释放对象内存以外的处理,是可以重载该函数的,但是不能调用[super dealloc])
3。不能使用NSAllocateObject, NSDeallocateObject
4。不能在C结构体中使用对象指针
5。id与void *间的如果cast时需要用特定的方法(__bridge关键字)
6 。不能使用NSAutoReleasePool、而需要@autoreleasepool块
7 。不能使用“new” "copy"开始的属性名称 (如果使用会有下面的编译错误”Property’s synthesized getter follows Cocoa naming convention for returning ‘owned’ objects”)
例如:newName,copyName都是错误的,违反了第7条
相关文章推荐
- Property follows Cocoa naming convention for returning 'owned' objects 错误解决办法
- iOS 错误 property's synthesized getter follows Cocoa naming convention for returning 'owned' objects
- 随笔-property follows cocoa naming convention for returning 'owned' objects
- property's synthesized getter follows Cocoa naming convention for returning 'owned' objects
- 小胖说事24-----property's synthesized getter follows Cocoa naming convention for returning 'owned' objec
- Property's synthesized getter follows Cocoa naming convention for returning 'owned' objects (2012-01
- Property's synthesized getter follows Cocoa naming convention for returning 'owned' objects
- property's synthesized getter follows Cocoa naming convention for returning 'owned' objects
- iOS:编译错误Property's synthesized getter follows Cocoa naming convention for returning 'owned' objectss
- Property's synthesized getter follows Cocoa naming convention for returning 'owned' objects
- 小胖说事24-----property's synthesized getter follows Cocoa naming convention for returning 'owned' objec
- error: property's synthesized getter follows Cocoa naming convention for returning 'owned' objects
- error: property's synthesized getter follows Cocoa naming convention for returning 'owned' objects I
- property's synthesized getter follows Cocoa naming convention for returning 'owned' objects
- Property's synthesized getter follows Cocoa naming convention for returning 'owned' objects
- property's synthesized getter follows Cocoa naming convention for returning 'owned' objects
- Error解决:Property's synthesized getter follows Cocoa naming convention for returning 'owned'
- warning: property's synthesized getter follows Cocoa naming convention for returning 'owned' object
- Property follows Cocoa naming convention for returning 'owned' objects
- aop配置拦截器required type [***] for property 'myBean': no matching editors or conversion strategy found