I have read this questions, but not only this ones, without finding a solution to my problem:
What it actually happens to me is that I achieve to hide the content of the status bar, but no the status bar itself:
override var prefersStatusBarHidden: Bool {
return true
}
It keeps appearing on the top of the screen, traslucid, with no content at all.
Common Step Go to Your info. plist file. Add a key called “View controller-based status bar appearance” and set its value to NO.
You can hide just a few icons or all of them for no status bar at all. To do so, open the Settings app, then scroll down and select "HideStatusBarItems." Once inside, the first thing you'll want to do is enable HideStatusBarItem by putting the toggle next to "Enable Tweak" to the on position.
To hide the status bar programmatically in Swift 3:
UIApplication.shared.keyWindow?.windowLevel = UIWindowLevelStatusBar
To bring it back:
UIApplication.shared.keyWindow?.windowLevel = UIWindowLevelNormal
If you want you can learn more about UIWindowLevel in Apple's docs.
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