I have a pretty basic app I am working on that uses a navigation view controller system. One of my view is a table view that I added a bar button to in the story board. This bar button is just a basic add button for adding a new item to the table view. I identified the segue for use in my prepare for segue method and then I created an IBAction for the button as well.
The segue pushes to my next view just fine and passed my desired object, but the action never triggered. I ended up having to put the code for the IBAction in my prepare for segue method to get it to work.
I’m just wondering why IBAction was never triggered.
1) remove the
segueNamedFooyou have created from the button to the destination view controller2) create a manual
segueNamedFoopush segue by CTRL-dragging from the leftmost small icon at the base of the origin view controller to the destination view controller3) in your
- (IBAction)doStuffBeforeSegue:(id)sendermethod which you have connected to your button perform the tasks which you want and then call[self performSegueWithIdentifier:@"segueNamedFoo"]