In Xcode < 9.3 we can hide status bar in view in xib by setting top bar simulated metrics to None
.
But now in 9.3, when setting this to None
, the status bar didn't hide.
Any ideas how to hide it?
step 1 : in your frameWork-Info. plst' file, add the key 'View controller-based status bar appearance' and set it to 'NO'.
To completely hide it on the home screen, open up an app, such as Settings, and wait about three to four seconds. Press the home button again, and the status bar will be completely gone. The status bar will only be hidden on your home screen, so you'll still see it while using apps.
Make sure your initial SwiftUI View is a Navigation view where you hide the status bar. Then if you navigate to a tab bar view or any subsequent views the status bar will be hidden.
You need to set simulated metrics size to "Freeform". Next, you need to change the size of your view to some custom value. After that Xcode will hide the status bar.
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