我正在使用 ARC(不,这不是 NDA)。我在我的界面中声明我的 ivar
id itemDelegate;
然后我声明属性:
@property (nonatomic, weak) id<mySecretDelegateYouAreNotSupposedToSeeOnSO> itemDelegate;
(因为 ARC 而用弱而不是分配)
在我的实现文件中,我只是合成它:@synthesize itemDelegate;
但是,我收到错误:
"Existing ivar 'ItemDelegate' for _weak property 'itemDelegate' must be _weak".
有谁知道怎么了?谢谢你的帮助。
ARC - 自动引用计数