views:

674

answers:

2

I notice something strange happens to one of my view controller: the back button disappears, yet it's possible to go back to previous view controller by tapping the top left corner (i.e where the button should reside).

In my entire file there's no line that set self.navigationItem.hidesBackButton to YES; also NSLog prints 0 as self.navigationItem.hidesBackButton's value in viewDidLoad.

This occurs in both the simulator and real device. Any ideas?

+12  A: 

Oh dear. In the implementation of the previous view controller, I accidentally set self.title to @"", which causes this annoying bug.

Remove this line solves the problem.

QAD
Nice catch, had this happen to me a few times. Now I realize it was when I was using titleViews.
Corey Floyd
ah solvored me problm thank!
Tristan
A: 

Thanks for the hint. Already lost some hours on this.

schoash