I've got a custom control with a custom delegate:
@class MyButtonSubclass;
@protocol MyButtonSubclass Delegate <NSObject>
@optional
- (void)delegateMethod:(NSString *)param;
@end
@interface MyButtonSubclass : UIButton
@property (nonatomic, weak) id < MyButtonSubclass Delegate> delegate;
@property (nonatomic, strong) NSString* param;
@end
And I've created a button in a Storyboard with the custom subclass:

Is there a way to get the custom delegate to appear in the list of connectable properties in the Storyboard?

Huzzah! The answer was quite simply staring me in the face. The delegate (or dataSource) definitions need to include IBOutlet:
@class MyButtonSubclass;
@protocol MyButtonSubclass Delegate <NSObject>
@optional
- (void)delegateMethod:(NSString *)param;
@end
@interface MyButtonSubclass : UIButton
@property (nonatomic, weak) IBOutlet id < MyButtonSubclass Delegate> delegate;
// ^ This!
@property (nonatomic, strong) NSString* param;
@end
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