I am using ARC (no, this is not NDA). I am declaring my ivar in my interface with
id itemDelegate;
I then declare the property:
@property (nonatomic, weak) id<mySecretDelegateYouAreNotSupposedToSeeOnSO> itemDelegate;
(with weak instead of assign because of ARC)
In my implementation file I simply synthesize it: @synthesize itemDelegate;
However, I am getting the error:
"Existing ivar 'ItemDelegate' for _weak property 'itemDelegate' must be _weak".
Anyone know what's wrong? Thanks for your help.
ARC - Automatic Reference Counting
Try something like the following (example from: http://vinceyuan.blogspot.com/2011/06/wwdc2011-session-323-introducing.html):
@interface SomeObject : NSObject { __weak id <SomeObjectDelegate> delegate; } @property (weak) id <SomeObjectDelegate> delegate; @end
Please notice how the ivar is declared.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With