You need to define a delegate on your custom view controller, for example:
@interface mergeConfig { id delegate; } @property (nonatomic, assign) id delegate; @end @implementation mergeConfig @synthesize delegate; @end
Then, in another place in the class for your view controller, you can reference any methods that you need for your delegate.
Personally, I like to improve the above by defining the protocol that my delegates execute, as follows:
@protocol MyDelegateProtocol - (void)delegateMethod; @end @interface mergeConfig { id<MyDelegateProtocol> delegate; } @property (nonatomic, assign) id<MyDelegateProtocol> delegate; @end @implementation mergeConfig @synthesize delegate; @end
source share