I have a navigation based app. The first view (rootcontroller) starts with three large buttons only. No navigationbar. From there, everything else is tableviews and have navigation bars. I'm doing this to show/hide the navigation bar:
MyAppAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
appDelegate.navigationController.navigationBar.hidden = NO;
Once I leave the root controller, the navigation bar will jerk into place and lay on top of the tableview, rather than pushing it down. It clips the top part of the tableview. Going back to the root controller isn't smooth in how the navigation bar disappears. Is there a smoother/better way to do accomplish hiding the navigation bar for the root controller only?
You can customize the navigation bar animation and duration by the following methods. It will provide you callback once animation will be completed.
Before hide a Navigation bar:
After hide a Navigation bar:
This nifty bit of code animates the navigation bar hiding with no UI issues:
[navigationController setNavigationBarHidden: YES animated:YES]
But...
You can use
[navigationController setNavigationBarHidden:YES animated:YES]
to hide the bar smoothly.Reference