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?
The navigation bar is pinned by default. If you want to view files or use apps in full screen, double-tap the Show and hide button to hide the navigation bar. To show the navigation bar again, drag upwards from the bottom of the screen.
Go to Settings > Display > Navigation Bar. Tap the toggle beside Show and hide button to switch it to the on position. If you don't see this option, check for any available software updates. The update might not be out all carrier-specific Galaxy S8 phones yet.
Click on the controller that has the top bar navigate to the properties bar on the right hand side of Xcode. There is a drop down labeled Top Bar (as shown above) change this drop down to none.
You can use [navigationController setNavigationBarHidden:YES animated:YES]
to hide the bar smoothly.
Reference
This nifty bit of code animates the navigation bar hiding with no UI issues:
[navigationController setNavigationBarHidden: YES animated:YES]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With