I have defined a delegate protocol in my custom class this way:
#import <Foundation/Foundation.h>
@protocol myProtocol <NSObject>
-(void)myMethod;
@end
@interface MyClass : NSObject {
id<myProtocol> delegate;
}
@property(nonatomic, assign) id<myProtocol> delegate;
@end
Now in Interface Builder, I drag an NSObject on to the ‘Objects’ area.
Set its class to MyClass.
Why does the connections Inspector not show ‘delegate’ option (like it does for framework classes below)?
You need to specify that it is an
IBOutletlike so:From UIKit Constants Reference: