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

后端 未结 5 844
萌比男神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:53

    When using a UIViewController the normal way (i.e. pushing it on a UINavigationController), it adjusts its view's frame.

    Since you're adding the subview manually, you have to adjust the frame yourself. The origin is in the upper right corner (at the top of the status bar). You want to shift your view 20 pixels down.

提交回复
热议问题