xcode 编译时遇到错误Existing ivar ’xxx‘ for unsafe_unretained property
在练习Obect-C点语法的时候:
//声明:int age;NSString *address;@property int age;@property NSString *address;//------//实现:@synthesize age;//编译器通过@synthesize address;//编译器提示错误://Existing ivar 'address' for unsafe_unretained property ''address' mustbe_unsafe_unretained
在XCode 4.2中,Cocoa项目默认启用了ARC(Automatic Reference Counting 自动引用计数 )。ARC据说是个“auto-magically”的功能,只是第三方支持不好~
将Object-C Automatic Reference Co... 改为No 就通过了。
在使用析构函数的时候[super dealloc]编译不通过也一并解决。
参考地址:http://book.douban.com/people/rockdragon/annotation/6392055/
-----end
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。