Hide panel displays spaces (even if the frame is full-screen)

Trying to do full screen viewing in the tabbar controller. It is in the landscape. You can hide the tab using self.tabBarController.tabBar.hidden = YES , this leaves a space in which there was a tab.

Creating a fullscreen tabbarcontroller using:

 self.tabBarController.view.frame = self.view.frame = CGRectMake(0, 0, 480, 320); [self.tabBarController.view setCenter:CGPointMake(160.0f, 240.0f)]; self.tabBarController.tabBar.hidden = YES; self.tabBarController.view.backgroundColor = [UIColor redColor]; 

Then I also try to force viewcontrollers to also view fullscreen. But he will not stick, unable to resize view.frame .

 self.view.backgroundColor = [UIColor yellowColor]; self.view.frame = CGRectMake(0, 0, 480, 320); [self.view setCenter:CGPointMake(160.0f, 240.0f)]; 

Is there any way around this beautifully?

The space image (in red) was disabled on the control panel

+4
source share
2 answers

Set the hidesBottomBarWhenPushed property to YES before clicking your viewController.

+1
source

Did you try to reproduce the autoresizingMask property of your view controllers instead of trying to manually change the view frames?

 self.tabBarController.view.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); self.view.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); 
0
source

All Articles