I've got a tableview based navigation controller. The root view controller has a + button which adds a new item. This results in a push segue to the view controller which allows the user to enter the data for the new item.
On this view controller, the upper left navbar item is the standard labeled "back" button. I've placed a "Save" [bar] button [item] as the upper right navbar item.
I created an unwind IBAction pushed view controller.
I then control-dragged from the Save button to the exit on the view controller and wired it to the unwind IBAction.
This unwind action is getting called when I hit the Save button.
However, nothing I do in the unwind action pops the view controller. Here is a little code:
- (BOOL)canPerformUnwindSegueAction:(SEL)action fromViewController:(UIViewController *)fromViewController withSender:(id)sender {
return YES;
}
- (BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender {
NSLog( @"Should seque from %@", identifier );
return YES;
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
}
- (IBAction)unwindFromGoalEdit:(UIStoryboardSegue *)segue {
NSLog( @"UNWINDING!!");
[self.navigationController popToViewController:segue.destinationViewController animated:YES];
}
In the unwind action below, I've attempted various ways to pop the view controller. But nothing happens. No runtime error, nothing. I do however see the NSLog() so I know it's being called.
Thoughts?