UINavigationController within ViewController, gap at top of view

后端 未结 11 1039
不知归路
不知归路 2021-02-04 03:24

I\'m working on a universal app, and I\'m trying to share as much code as possible between the iPhone and iPad versions. I need to use a TabBarController as my root view contro

11条回答
  •  佛祖请我去吃肉
    2021-02-04 03:35

    To fix this problem just check the box Wants Full Screen on the storyboard.

    The problem appears because the ParentViewController is showing the navigation bar.

    As apple documentation said :

    If your app displays the status bar, the view shrinks so that it does not underlap the status bar. After all, if the status bar is opaque, there is no way to see or interact with the content lying underneath it. However, if your app displays a translucent status bar, you can set the value of your view controller’s wantsFullScreenLayout property to YES to allow your view to be displayed full screen. The status bar is drawn over the top of the view.

提交回复
热议问题