开发者

Why is there a gap between status bar and main view

开发者 https://www.devze.com 2023-04-08 00:58 出处:网络
I am using a UITabBarController to switch between two view controllers. The first view controller looks fine but the second view controller has a white gap between the status bar and the root view equ

I am using a UITabBarController to switch between two view controllers. The first view controller looks fine but the second view controller has a white gap between the status bar and the root view equaling the height of the status开发者_Go百科 bar.

Why is there a gap between status bar and main view

Here is the nib file for the second view controller. I've turned on the simulated status bar and tab bar and placed the UIImageView flush between those two bars. My code does nothing to change the position of the UIImageView.

Why is there a gap between status bar and main view

I noticed that the Facebook app sometimes has this problem when returning from viewing a photo to the news feed. My problem is similar, except it happens 100% of the time. What could be the problem?


What is the origin of your containing view and image view? If you have manually adjusted these to compensate for the status bar and then your nib is set to want full screen, this may cause it to be one status bar's height below the top of it's content view, which looks like the situation you have. The origins of both views should be (0,0), I think.

0

精彩评论

暂无评论...
验证码 换一张
取 消