I'm in the same situation as this problem. For some reason, the status bar still doesn't fade in or out. I've pretty much tried every solution posted on this website.
I'm using a UINavigationController
-> UIViewController
.
I have View controller-based status bar appearance
set to YES
.
Here's my code:
var statusBarHidden = false
func toggleStatusBarHidden() {
statusBarHidden = !statusBarHidden
setNeedsStatusBarAppearanceUpdate()
}
override func prefersStatusBarHidden() {
return statusBarHidden
}
override func preferredStatusBarUpdateAnimation() {
return .Fade
}
Any ideas why that might be the case?