call action method for a uibutton without using interface builder in cocoa-Collection of common programming errors
If your action method is defined like:
- (IBAction)myMethod:(id)sender;
(the sender parameter is entirely optional), then you can just call
[self myMethod:self];
IBAction is simply a macro defined to allow Interface Builder to pick up on methods that can be used in Interface Builder. It resolves to void, after preprocessing, so your method signature at runtime is:
- (void)myMethod:(id)sender;
Just like any other method.