21

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

Lee Mac
  • 15,615
  • 6
  • 32
  • 80
Svetoslav
  • 568
  • 4
  • 9

2 Answers2

35

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.

jarora
  • 5,384
  • 2
  • 34
  • 46
Svetoslav
  • 568
  • 4
  • 9
-4

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

Aleem
  • 3,173
  • 5
  • 33
  • 71