I have a view that is loaded in the MainWindow.xib. It is just a view with a uiimageview in it that shows a image on the entire screen ( 320 X 480 ). When the app loads I display this view and then I do a
[self.view addSubview:tabbarController.view];
Tab Bar Controller is just a UITabBarController with 2 View Controllers added to it. When it adds the tabbarController's view to the subview it leaves a gap at the top of about 20px. My app does have a status bar but this is basically room for another. This happens unless I add this to my view controller:
self.view.frame = CGRectMake(0, 0, 320, 480);
Can anyone explain this. I was doing
self.view = tabbarController.view;
but was told I shouldn't do that. So now I'm adding a subview, but I don't understand why I have to adjust the CGRect of my view to not show the 20px.