How to Leave the Status Bar and Turn the Navigation Bar Off

Asked 2 years ago, Updated 2 years ago, 76 views

How do I turn off the navigation bar on iOS by following the scroll like Facebook, leaving a status bar?

If possible, I would like to do this without using the library (as I am not going to use the oss library as much as possible).

Just
self.navigationController?setNavigationBarHidden(true, animated:true)
Then both disappear.

ios objective-c swift2

2022-09-30 14:04

2 Answers

The easiest way to do this is to set hidesBarsOnSwipe to true in the UINavigationController.

navigationController?.hidesBarsOnTap=true

Reference


2022-09-30 14:04

Hide the UINavigationController navigation bar and
I think it would be easier to use a UI similar to the navigation bar with UIView etc.


2022-09-30 14:04

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.