Reputation: 11231
I have a UIBarButtonItems, left side is edit and right side is add/done;
Now When edit is not clicked the action for right side button is to take me to next view controller and I have setup this using segue in storyboard.
However when edit is clicked I want to perform a different action i.e I don't want to go to that new view controller rather disable editing when clicked on that right side UIBarButtonItem.
Now I also have a IBAction done; which disables the editing.
But how to shift the behavior between add/done;
I can do this via programming; But since I have added the segue via storyboard, I wanted to know if there is a way I can switch between segue from storyboard and the IBAction in my controller.
Thanks.
Upvotes: 0
Views: 61
Reputation: 9025
Your problem is that you connect button action to perform specific segue. You can
- (void)performSegueWithIdentifier:(NSString *)identifier sender:(id)sender
That's all!
Upvotes: 3