在我的iPhone应用程序中.
我在UITabBarController中使用UINavigationControllers.
喜欢:
标签栏:
>导航控制器.
>查看Controller1.
>导航控制器.
>查看Controller2.
从任何上述视图控制器查看Controllerx.
当我导航到View Controllerx时.
我隐藏了标签栏.
[self.tabBarController.tabBar setHidden:YES]; [self.tabBarController.tabBar setFrame:CGRectZero]; [self.navigationController pushViewController:obj_tipcalc animated:YES]; [obj_tipcalc release];
谢谢.
解决方法
您的导航控制器视图位于UITabBarController的视图中,并且不会填满整个屏幕.
只需尝试调整大小:
只需尝试调整大小:
... CGRect biggerFrame = tabBarController.view.frame; biggerFrame.size.height += tabBarController.tabBar.frame.size.height; tabBarController.view.frame = biggerFrame ; ...
要恢复原始布局:
... CGRect smallerFrame = tabBarController.view.frame; smallerFrame.size.height -= tabBarController.tabBar.frame.size.height; tabBarController.view.frame = smallerFrame; ...