简体   繁体   中英

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 :

屏幕截图

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM