首页 > 技术文章 > Xcode升级了6.3 出现的警告:Auto property synthesis will not synthesize property

mohe 2015-04-10 14:03 原文

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;

 

推荐阅读