I have a navigation controller. For one of the views i want to hide the bottom tab bar, so it gets the max possible screen real estate. To do this, i have:
-
It's been a while since this question was asked, but none of these answers address using Storyboard segues. It turns out to be pretty easy:
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "MyViewControllerIdentifier" {
// Hide the tabbar during this segue
hidesBottomBarWhenPushed = true
// Restore the tabbar when it's popped in the future
DispatchQueue.main.async { self.hidesBottomBarWhenPushed = false }
}
}