Reputation: 823
I have an IBAction button in one UIViewController that I want to perform an action in another UIViewController. How do I do this?
Upvotes: 0
Views: 1672
Reputation: 928
Declare a method in the second UIViewController and call from the IBAction in the first controller.
Something like this:
-(IBAction)myMethodFromFirstController{
SecondController *secondController = [[SecondController alloc] init];
[secondController method];
}
Upvotes: 1