Not sure why UIView is being nudged up by around 10px

后端 未结 5 845
萌比男神i
萌比男神i 2020-12-09 12:10

I\'ve created a simple iPhone app which has two .xib files. In the app delegate at application did finish launching I display the first .xib file by calling:



        
5条回答
  •  借酒劲吻你
    2020-12-09 12:58

    Whenever a weird gap appears, or the view is partly hidden behind the status bar, it has something to do with either

    1. shouldAutorotate definition in your root controller - not sure if it is a bug or not, but try to stay consistent with the return of that function for all sub-viewcontrollers (usually results in a viewcontroller being hidden behind the status bar)
    2. a wantsFullscreen definition of a subview - set to NO if possible

    i had both bugs in my app and solved them! Hope I could save you some time (I wasted a lot on it)

提交回复
热议问题