Xcode升級了6.3 出現的警告:Auto property synthesis will not synthesize property


1.  Auto property synthesis will not synthesize property 'title'; it will be implemented by its superclass, use @dynamic to acknowledge intention

    這是說編譯器自動給屬性title合成getter和setter的時候將會在它的父類上實現,也就是說坑爹的xcode6.3升級后ios8.3版本的UIViewController里有一個title屬性,現在它不知道到底是哪一個title.

    這不是我們想要的,所以添加 @dynamic告訴編譯器這個屬性是動態的,動態的意思是等你編譯的時候就知道了它只在本類合成;

    解決:

 

@implementation SearchResultViewController

@dynamic title;

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM