Layered UIViewControllers overlaps status bar

后端 未结 1 1230
无人共我
无人共我 2021-01-26 08:27

Following this tutorial and this question, I attempted to create a custom UIViewController containing a UINavigationController. This mostly worked, exc

相关标签:
1条回答
  • 2021-01-26 09:23

    One possible solution is to change the loadView function of the UIViewController to set the frame of the view using: [[UIScreen mainScreen] applicationFrame] instead of contentView.frame. I'm not sure whether this is the best solution and how this will interact if you attempt to put the custom view controller underneath another view controller.

    Ideally, I would be be given the size I have to draw into inside the loadView method. Unfortunately, we aren't given this. See this question for more info.

    0 讨论(0)
提交回复
热议问题