时间 | 版本修改 |
---|---|
2020年4月3日 | 初版 |
2020年4月17日 | 详细描述了实现"协议中的属性"的问题 |
@property (strong, nonatomic) UIWindow * window;
AppDelegate
添加window
属性时,直接添加了匿名分类中,报错:Illegal redeclaration of property in class extension ‘AppDelegate‘ (attribute must be ‘readwrite‘, while its primary must be ‘readonly‘)
Attribute ‘readonly‘ of property ‘window‘ restricts attribute ‘readwrite‘ of property inherited from ‘UIApplicationDelegate‘
@synthesize
声明。原文:https://www.cnblogs.com/HelloGreen/p/12723325.html