I have this code (snippet) from a .h file:
#import
#import \"ILView.h\"
/**
* Controls the orientation of the picker
*/
typedef enum {
As the error message is telling you, the ivar:
@interface ILHuePickerView : ILView {
id<ILHuePickerViewDelegate> delegate; // <-- This is the ivar
needs to be declared __unsafe_unretained
:
__unsafe_unretained id<ILHuePickerViewDelegate> delegate;
not the property:
@property (assign, nonatomic) IBOutlet id<ILHuePickerViewDelegate> delegate;
because the ARC ownership qualifiers don't apply to properties; they only apply to variables.
Since the @synthesize
directive creates the ivar for you (with the correct ARC qualifier), however, you can just skip its declaration:
@interface ILHuePickerView : ILView
/**
* Delegate
*/
@property (assign, nonatomic) IBOutlet id<ILHuePickerViewDelegate> delegate;
// etc.
Which is, in fact, now the recommended procedure; see Defining Classes in TOCPL.
I've used ILColorPicker in the past, and it is definitely not ARC ready. Set
-fno-objC-arc
in the compiler flag settings for the ILColorPicker classes.