您好,登錄后才能下訂單哦!
在練習(xí)Obect-C點語法的時候:
//聲明: int age; NSString *address; @property int age; @property NSString *address; //------ //實現(xiàn): @synthesize age;//編譯器通過 @synthesize address;//編譯器提示錯誤: //Existing ivar 'address' for unsafe_unretained property ''address' mustbe_unsafe_unretained
在XCode 4.2中,Cocoa項目默認啟用了ARC(Automatic Reference Counting 自動引用計數(shù) )。ARC據(jù)說是個“auto-magically”的功能,只是第三方支持不好~
將Object-C Automatic Reference Co... 改為No 就通過了。
在使用析構(gòu)函數(shù)的時候[super dealloc]編譯不通過也一并解決。
參考地址:http://book.douban.com/people/rockdragon/annotation/6392055/
-----end
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。