Why is there a gap between status bar and main view
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.
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.
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.
精彩评论