In my iPhone app.
I am using UINavigationControllers
in UITabBarController
.
Like:
Tab Bar:
Navigation Controller.
Navigation Controller.
View Controllerx from any of above view controllers.
When I navigates to the View Controllerx.
I am hiding the tab bar.
The problem is that tab bar is hiding but view size reduces. And white space appears at bottom.
[self.tabBarController.tabBar setHidden:YES];
[self.tabBarController.tabBar setFrame:CGRectZero];
[self.navigationController pushViewController:obj_tipcalc animated:YES];
[obj_tipcalc release];
Thanks.
Your navigation controller's view lies within the view of your UITabBarController and it's not filling the entire screen. Simply try to resize it:
...
CGRect biggerFrame = tabBarController.view.frame;
biggerFrame.size.height += tabBarController.tabBar.frame.size.height;
tabBarController.view.frame = biggerFrame ;
...
To bring back the original layout:
...
CGRect smallerFrame = tabBarController.view.frame;
smallerFrame.size.height -= tabBarController.tabBar.frame.size.height;
tabBarController.view.frame = smallerFrame;
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With