21
votes

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?

enter image description here

2

2 Answers

35
votes

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.

-4
votes

On your info.plist add the following two property for statusBar Hidden

View controller-based status bar appearance (Boolean: NO)

Status bar is initially hidden (Boolean: YES)

By Source

<key>UIStatusBarHidden</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>

or

enter image description here