So here is what i have: A UITabBarController that handles different UIViewControllers. In one of the UIViewController i am trying to switch the view being displayed when the device rotates to landscape. the important part is that the view displayed in landscape MUST take the whole screen...
I have correctly implemented the methods :
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
In fact i do have my rotation occurring correctly, and I my views swaped. i even hide status bar, nav bar and Tab bar BUT i keep having a blank space at the bottom of the screen which is the place of the TabBar...
So i am assuming that setting the hidden property of the tabBar is not enough in order to have the view on the whole screen. I think there is some stuff to do within the TabBarController or even the MainWindow to say somehting like "i don't need TabBarController now". But i do not see how to get around this problem properly.
If anyone has been around this issue, i would appreciate some help.
thank you, Sami.
This code works fine but when i dismiss a uiviewcontroller which is presented modally, my view is under the status bar by 20 pixel. My view is inside a navigationcontroller so i do not hide it before rotation.
This approach is working for me:
(Only tested in iOS8.)
If you have your UITabBarController then put a UINavigationController inside it then you can use hidesBottomBarWhenPushed (with a bit of trickery) to do this.
The trick is to push your view controller so that the
hidesBottomBarWhenPushed
flag is picked up. You can use following.Subclass your TabBarController and hide the TabBar when needed:
This worked for me.