Objective-c 內存管理中的錯誤提示 'retainCount' is unavailable 解決方法

error: 'retainCount' is unavailable: not available in automatic reference counting mode 

 

後來發現是編譯選項的問題:
 
1.點擊工程名 打開編譯選項
2.在編譯選項中,選擇Bulid Setting選項卡
3.在Apple LLVM compiler X.X - Language項目中,找到Ojective-C Automatic Reference couting 選項(直接搜索這個項目 或者搜arc)
4.把默認的yes 修改成no。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章