Please prove yourself a good stackoverflow user and accept/upvote my answer :)
[[self navigationController] setNavigationBarHidden:UIDeviceOrientationIsLandscape(toInterfaceOrientation) animated:YES];
then in a subclassed UITabBarController
- (void) hideTabBar:(BOOL)hide animated:(BOOL)animated {
if (tabBarHidden == hide) { return; }
if (animated) {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.5];
}
for(UIView *view in self.view.subviews) {
if([view isKindOfClass:[UITabBar class]]) {
if (!hide) {
[view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y-49, view.frame.size.width, view.frame.size.height)];
} else {
[view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y+49, view.frame.size.width, view.frame.size.height)];
}
} else {
if (!hide) {
[view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width, view.frame.size.height-49)];
} else {
[view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width, view.frame.size.height+49)];
}
}
}
if (animated) { [UIView commitAnimations]; }
tabBarHidden = hide;
}