so I have two view controllers setup like this in the interface builder:
[initial view] -- [signup view]. Initial view pushes to signup view via segue when a button is pressed. I have a back button on the signup view controller. When this is pressed I want to go back to the initial view controller. I am using this code:
- (IBAction)tapBack:(id)sender {
NSLog(@"back");
[self.navigationController popViewControllerAnimated:YES];
}
the button is wired up correctly but nothing happens when I tap the button. Why is this? Does one of the UIVIewControllers have to be a UINavigationController to work or something? I am just using two UIViewController. Thanks
If segue is modal then you cant pop back because it is modal view. To check, replace tabBack action method content with:
[self dismissViewControllerAnimated:YES completion:nil]
if it pops back then segue is modal.