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
Subclass your TabBarController and hide the TabBar when needed:
class tabBarVC: UITabBarController {
override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
if size.height < size.width {
self.tabBar.hidden = true
} else {
self.tabBar.hidden = false
}
}
}