Search code examples
iosobjective-ciphoneswiftstatusbar

Full screen UIViewController on iOS 7


I have an app that displays well on iOS 8, iPhone 5, but can't display full screen in iOS 7, iPhone 4. As you can see in the screen shot below, there is a white bar at the top of the screen. The white bar is present in all my view controllers.

In my info.plist I have :

View controller-based status bar appearance : NO
Status bar is initially hidden : YES

In my ViewController I have :

override func prefersStatusBarHidden() -> Bool {
   return true
}

The screenshot :

Screen shot


Solution

  • I think you probably have your top constraint set to pin to the top margin rather than the top.

    Remove the margin and pin to the top of the superview directly.