I have made a very simple project in Xcode 4 where I connected 4 Navigation view controllers using storyboard mode. I didn’t write a single piece of code. Now the problem that I have is with the Done button. See attached pictures.
When you click on the button on page 1, it take you to page 2. Clicking the button there takes to page 3. You see the Page1, Page2 back buttons. Pretty straight forward.
Now what I did was on page 2 I added a “+” button which take the user to page 4. When I click on “Done” button there I get taken back to page 2 but the problem is that the back button shows “Page 4” what I need it to show is “Page 1”. I connected all the views using “Push”
Any ideas if this can be done through story board or do I need to write some code to fix this behavior?





Segues can only create / push new controllers onto the stack, they are not used to pop / go backwards in the stack hierarchy. So you need to write a IBAction that pops the viewController when the user taps the Done button.
be sure to connect the IBAction to your button in the storyboard.