Xcode中出现Illegal redeclaration of

2018-05-23  本文已影响171人  Coder_JMicheal

 当我们在@interface中声明属性的时候,偶尔会遇到类似于下面这个警告❌:
Illegal redeclaration of property in class extension 'XXXXTableViewCell' (attribute must be 'readwrite', while its primary must be 'readonly')
 原因是我们 重复声明 了该属性,
 解决办法:

删掉.h或者.m文件中多余的属性即可。
上一篇 下一篇

猜你喜欢

热点阅读