I'm building a application with Swift + AVPlayer and have set "View controller-based status bar appearance" to "YES". The problem with this is that when I launch the player from my UITableViewController/UINavigationController the nav bar hides the status bar automatically and the nav bar is resized.
You can see what I mean here:
http://quick.as/eOXLiv45x
Is there any way to prevent this?
Cheers!
Touch “Settings” -> “Display” -> “Navigation bar” -> “Buttons” -> “Button layout”. Choose the pattern in “Hide navigation bar” -> When the app opens, the navigation bar will be automatically hidden and you can swipe up from the bottom corner of the screen to show it.
The Navigation bar is the menu that appears on the bottom of your screen - it's the foundation of navigating your phone. However, it isn't set in stone; you can customize the layout and button order, or even make it disappear entirely and use gestures to navigate your phone instead.
Step 10: search “android:dimen/navigation_bar_frame_height” in the search bar and set it to 0. Hit apply and save it and ensure the tick mark. And your Navigation gesture pill will disappear and you will have an uninterrupted Android experience tailored to perfection just by you.
Okay, so this was the solution I used in the end.
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
UIApplication.sharedApplication().setStatusBarHidden(true, withAnimation: .Fade)
}
override func viewWillDisappear(animated: Bool) {
super.viewWillDisappear(animated)
UIApplication.sharedApplication().setStatusBarHidden(false, withAnimation: .Fade)
}
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