ARC error when declaring delegate ivar

iPhone 3 ก.ค. 2012

With ARC and iPhone Simulator 5.0 the following seems to work just fine (no warnings, etc…):

SomeObject.h

@class SomeObject;
@protocol SomeObjectDelegate <NSObject> 
- (void)someObjectDidFinishDoingSomethingUseful:(SomeObject *)object; 
@end
@interface SomeObject : NSObject {
__unsafe_unretained id <SomeObjectDelegate> _delegate;
 }
@property (nonatomic, assign) id <SomeObjectDelegate> delegate; 
@end 


SomeObject.m

#import "SomeObject.h" @implementation SomeObject @synthesize delegate = _delegate; @end

แท็ก

Onyx

Just a middle-aged programmer, Can do many things but not the most.