A quick question if I may, can anyone explain what I am missing below, I was assuming the 3rd one with the would work?
@interface ...
// These work
@property(assign) SomeClass *someDelegate;
@property(assign) id someDelegate;
// This gives warning
@property(assign) id <SomeClassDelegate> someDelegate;
.
@implementation ...
@synthesize someDelegate;
[self setSomeDelegate:[[SomeClass alloc] init]];
[someDelegate setDelegate:self];
.
warning: method '-setDelegate:' not found (return type defaults to 'id')
EDIT_001:
// SomeClass.h
#import <Foundation/Foundation.h>
@class SomeClass;
@protocol SomeClassDelegate <NSObject>
@optional
-(void)didHappen:(SomeClass *)someClass;
@required
-(void)willUse:(SomeClass *)someClass withThis:(BOOL)flag;
@end
@interface SomeClass : NSObject {
id <SomeClassDelegate> delegate;
}
@property(assign) id <SomeClassDelegate> delegate;
-(void)otherActions;
@end
cheers Gary.