Reputation: 15
Can prepareForSegue method be applied in an action button?
If yes please can anyone teach me how?
Upvotes: 0
Views: 84
Reputation: 6557
You don't call prepareForSegue yourself.
You create an action for your button, then call the performSegue:
[self performSegueWithIdentifier:@"yourIdentifier" sender:self];
Then in the prepareForSegue you do what you want based on the identifier.
Upvotes: 3