Hide navigation bar, but when I transition to the previous view (popped) it shows the old back button temporarily. Why?

ios, objective-c, uinavigationbar, uinavigationcontroller, uistoryboardsegue

Solution

Hey why don't you use navigation bar as a `UIToolbar`.

Instead Of hiding `UINavigation` you can mimic navigation controller to `UITootlbar` by adding buttons to it.

hiding unhiding `UINavigation` would be complex.

I am Uploaded the dropbox link.

Problem

I have view controllers in a navigation controller (root: `RootViewController`, second: `ReadingViewController`), but in the second view controller I want to disable the navigation bar for a `UIToolBar` (as I don't need the title and want more buttons, like in iBooks or the Facebook app). Problem is, when I hide the navigation bar in the second view, it appears randomly for a second again when I pop the view controller (go back). When I pop the view controller the back button appears for a second: In the second view controller I hide the nav bar in `viewWillAppear:`: ``` - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; [self.navigationController setNavigationBarHidden:YES animated:YES]; } ``` Also in the second view controller, I restore the nav bar in `viewWillDisappear:`: ``` - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; // ... other stuff [self.navigationController setNavigationBarHidden:NO animated:YES]; } ``` I'm wondering how I combat this issue so that the view controllers transition seamlessly.

Original source