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 intentionios

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

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

    解決:code

 

@implementation SearchResultViewController

@dynamic title;
相關文章
相關標籤/搜索