I am developing an app with xcode4.5 for iOS 6 and I mainly used the storyboard I have multiple screens which on all of them I have a tool bar where I add a button with a back arrow on it so I want this button to take me to the previous screen when I tap on it I can not seem to set this with the storyboard so my question is how do I do that?
Asked
Active
Viewed 140 times
1 Answers
0
you need to use a navigation controller which does the pushing/popping of the view controls
you will get the navigation bar for free.

Daij-Djan
- 49,552
- 17
- 113
- 135
-
No that's not what I need I must have the back button in the tool wich also have two other button that takes you to sub menus but I want this back button to work as a back button – Jean-christophe Mazza Nov 19 '12 at 20:12
-
yes it is ;) if you dont need the navbar, you dont have to use it but the controller is what makes the back functionality, then YOUR custom button would do: [self.navigationController popViewController] – Daij-Djan Nov 19 '12 at 21:22
-
Sorry but I still don't get it am I suppose to add a code or link something in the storyboard? – Jean-christophe Mazza Nov 19 '12 at 22:26
-
no you need to add a navigationController. you likely need code for the custom UI but I am not sure -- I dont use storyboards too much – Daij-Djan Nov 19 '12 at 22:36
-
Where do I write the code for self.navigationcontroller popviewcontroller? – Jean-christophe Mazza Nov 19 '12 at 22:43