In iOS 26, the tab bar never disappears when new controller is pushed

In my app, I have a tab bar controller whose first tab is a navigation controller. Taking a certain action in that controller will push a new controller onto the navigation stack. The new controller has hidesBottomBarWhenPushed set to true, which hides the tab bar and shows the new controller's toolbar.

It's worked like this for years. But in the iOS 26 simulator (I don't have the beta installed on any physical iPhones yet), when I tried this behavior in my app, I instead saw:

  • the tab bar remained exactly where it was when I pushed the new controller
  • the toolbar never appeared at all and all of its buttons were inaccessible

If you set the deployment target to iOS 18 and run the code in an iOS 18 simulator:

  • when you tap "Tap Me", the new controller is pushed onto the screen
  • simultaneously, the tab bar hides and the second controller's toolbar appears.

If you set the deployment target to iOS 26 and run the code in an iOS 26 simulator:

  • when you tap "Tap Me", the new controller is pushed onto the screen
  • the toolbar never appears and the tab bar remains unchanged after the push animation completes

Is this a bug in the iOS 26 beta, or is it an intentional behavior change in how hidesBottomBarWhenPushed works in these cases?

Below is sample code that reproduces the problem:

class TabController: UIViewController {
  override func viewDidLoad() {
    super.viewDidLoad()
    
    let button = UIButton(type: .roundedRect, primaryAction: UIAction(title: "Test Action") { action in
      let newController = SecondaryController()
      self.navigationController!.pushViewController(newController, animated: true)
    })

    button.setTitle("Tap Me", for: .normal)
    
    button.translatesAutoresizingMaskIntoConstraints = false
    self.view.addSubview(button)
    
    NSLayoutConstraint.activate([
      self.view.centerXAnchor.constraint(equalTo: button.centerXAnchor),
      self.view.centerYAnchor.constraint(equalTo: button.centerYAnchor),
    ])
  }
}

class SecondaryController: UIViewController {
  override func loadView() {
    super.loadView()

    self.toolbarItems = [
      UIBarButtonItem(image: UIImage(systemName: "plus"), style: .plain, target: nil, action: nil)
    ]
  }
  
  override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)

    self.navigationController?.isToolbarHidden = false
  }
}

class SceneDelegate: UIResponder, UIWindowSceneDelegate {

  var window: UIWindow?
  var tabController: UITabBarController?

  func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
    guard let windowScene = (scene as? UIWindowScene) else { return }
    
    let tab1 = UITab(title: "Test 1", image: UIImage(systemName: "globe"), identifier: "test1") { _ in
      UINavigationController(rootViewController: TabController())
    }
    let tab2 = UITab(title: "Test 2", image: UIImage(systemName: "globe"), identifier: "test2") { _ in
      UINavigationController(rootViewController: TabController())
    }
    
    window = UIWindow(windowScene: windowScene)
    self.tabController = UITabBarController(tabs: [tab1, tab2])
    self.window!.rootViewController = self.tabController
    self.window!.makeKeyAndVisible()
  }
}
Answered by swiftuiforever in 845348022
Accepted Answer

Use

self.tabBarController?.tabBar.isHidden = true

in viewWillAppear to fix this issue.

In iOS 26, the tab bar never disappears when new controller is pushed
 
 
Q