问题
I just create a new project template for TabBar application in Xcode.
I arrange a storyboard to let a UITabbarController
embedded in another view controller like this (in order to provide red header for all tab pages)

Notice that in first tab page, I put two labels on the first page. Both are locating at the top and bottom of the screen.
and here is a setting of first tab view controller.

and this is the result i have got on both device and simulator.

Why and how can my second label half shown? i try to uncheck all options and setting
self.automaticallyAdjustsScrollViewInsets = NO;
self.edgesForExtendedLayout = UIRectEdgeNone;
but none is working.
How can I solve this?
Thanks.
UPDATE
I already know what is the culprit behind this. It is the tabbar's height for ipad landscape mode normally the height is 49 but according to apple here
They said the height will be 56 for ipad.
But in interface builder, it is always 49 and and the rootviews of my viewcontroller in each tab are calculate using this 49 height of tabbar even though i use an autolayout.
So I have a way to overcome this by create another view and let it has smaller height by 7 pixel from rootview.
But WHY interface builder display 49 pixel of tabbar instead of 56?
回答1:
It is not quite clear to me what you are really asking, but if you simply want a red header at the top of your view controllers, you can embed them inside of an UINavigationController. Even if you still want a UITabBarController, embed every child view inside of a UINavigationController and then you can control the look of your header.
(Note: I would just add this as a comment but I don't have the reputation.)
来源:https://stackoverflow.com/questions/24169546/why-my-label-is-under-tab-bar-from-uitabbarcontroller-inside-viewcontainer