Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invisible back button when view controller pushed onto navigation controller

I'm using a navigation controller to drill into a detail view when a cell is tapped. When I push my view controller onto the navigation controllers stack, I expect to see a back button that I can tap to pop the previous view off the stack.

The issue is that the back button isn't visible, but when tapping where it should be returns me to the previous view. What's the problem?

like image 921
Robert Conn Avatar asked Mar 16 '10 23:03

Robert Conn


1 Answers

Ensure you have set a title for the master view - for example in viewDidLoad add this -

self.title = @"The Title";

Weirdly, if there is no title for the parent view controller on the stack, rather than show an empty back button, the iPhone will not display a button but will allow taps on the area where it should be.

This bugged me for a long time!

like image 114
Robert Conn Avatar answered Nov 09 '22 16:11

Robert Conn