Reputation: 639
I want to add a Back button to a Navigation Controller. This is how my storyboard looks like:
I have a ProgViewController for the main screen. The TableView is embedded into the Navigation Controller. I also have a ProgPlayersViewController for the TableView.
My question is how can I add a Back button to the Navigation Controller?
Thanks for your help.
Upvotes: 0
Views: 939
Reputation: 3940
ProgViewController needs to be in the navigation stack so that you can go back (ie. 'pop') to that view controller.
The actual button itself is created by the navigation controller assuming that there is a view controller to actually go back to.
The navigation controller, as you have it in your diagram, needs to be before the ProgViewController and not after it.
Note if you don't want the navigation bar to be visible in the ProgViewController you can set it to hidden.
Upvotes: 2