美文网首页
Auto property synthesis will not

Auto property synthesis will not

作者: iOS_愛OS | 来源:发表于2018-06-13 17:56 被阅读38次

警告 Auto property synthesis will not synthesize property 'size'; it will be implemented by its superclass, use @dynamic to acknowledge intention

表示:类中的这个属性,在父类中也存在,这时候编译器不知道到底是 到底 synthesize 哪个属性。就会报错。

  • 可以使用 @synthesize 属性; 去自动 synthesize 该类属性
  • 也可以使用 @dynamic 属性; 去手动去实现 get 和 set 方法 同时生成 成员变量

相关文章

网友评论

      本文标题:Auto property synthesis will not

      本文链接:https://www.haomeiwen.com/subject/brcseftx.html