I have a tab controller, which contains a navigation controller which again contains a view controller. The view controller shows a tab bar and a navigation bar.
In this view controller I want to add a full screen view (hides the tab bar and the navigation bar but leaves the status bar) which is shown during loading. I have subclassed UIView and set up a layout in a nib file which is loaded to this view:
- (id)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame])
{
// Load nib
self = [[[NSBundle mainBundle] loadNibNamed:@"FrontpageCountdownView" owner:self options:nil] objectAtIndex:0];
}
}
I add this view in the view controller like this:
// Hide tab bar and navigation bar
self.tabBarController.tabBar.hidden = YES;
self.navigationController.navigationBar.hidden = YES;
// Add loading (frontpage countdown) view
CGRect frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height);
NFFrontpageCountdownView *countdownView = [[NFFrontpageCountdownView alloc] initWithFrame:frame];
[self.view addSubview:countdownView];
The view in my nib has a size of 460 (full screen, minus the status bar). My problem is, that when I add it to the view controller it appears “bigger”.
I would think that since the view has a size of 460 it should show the entire view when it is added to the view controller but it doesn’t show the bottom. It seems that the view is too big even though it is 460 pixels.
Can anybody tell me why this is?

EDIT
How my view looks in Interface Builder:

How my view looks in the simulator:

This happens when hiding the tab bar using
self.tabBarController.tabBar.hidden = YES.Instead, you should hide it and then extend the view of the
tabBarController.