Post

Replies

Boosts

Views

Activity

Reply to UITabBar Appears During Swipe-Back Gesture on iOS 26 Liquid Glass UI
Minimal Reproducible Example class AViewController: UIViewController { private lazy var someButton: UIButton = { let button = UIButton(type: .system) button.setTitle("GOGO", for: .normal) button.addTarget(self, action: #selector(didTapSomeButton), for: .touchUpInside) return button }() override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .green view.addSubview(someButton) someButton.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ someButton.centerXAnchor.constraint(equalTo: view.centerXAnchor), someButton.centerYAnchor.constraint(equalTo: view.centerYAnchor) ]) } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) // tabBarController?.setTabBarHidden(false, animated: true) } @objc private func didTapSomeButton() { let bvc = BViewController() bvc.hidesBottomBarWhenPushed = true navigationController?.hidesBarsOnSwipe = true navigationController?.hidesBottomBarWhenPushed = true navigationController?.pushViewController(bvc, animated: true) } } class BViewController: UIViewController { private lazy var someButton: UIButton = { let button = UIButton(type: .system) button.setTitle("This is B View Controller", for: .normal) button.addTarget(self, action: #selector(didTapSomeButton), for: .touchUpInside) return button }() override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .red view.addSubview(someButton) someButton.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ someButton.centerXAnchor.constraint(equalTo: view.centerXAnchor), someButton.centerYAnchor.constraint(equalTo: view.centerYAnchor) ]) } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) // tabBarController?.setTabBarHidden(true, animated: true) } @objc private func didTapSomeButton() { print("GOGO") } } // MARK: - Custom UITabBarController class TabBarController: UITabBarController { override func viewDidLoad() { super.viewDidLoad() let aVC = AViewController() tabs.append(configTab(aVC, title: "Chat", imageName: "message", identifier: "chats", badgeValue: "3")) tabs.append(configTab(UIViewController(), title: "Contacts", imageName: "person.2", identifier: "contacts")) tabs.append(configTab(UIViewController(), title: "Discover", imageName: "safari", identifier: "discover")) tabs.append(configTab(UIViewController(), title: "Me", imageName: "person", identifier: "me")) tabs.append(configSearchTab(UIViewController(), title: "Search")) selectedTab = tabs.last self.tabBarMinimizeBehavior = .onScrollDown self.bottomAccessory = UITabAccessory(contentView: UIToolbar()) } // MARK: Configure UITab func configTab(_ viewController: UIViewController, title: String, imageName: String, identifier: String, badgeValue: String? = nil) -> UITab { let tab = UITab(title: title, image: UIImage(systemName: imageName), identifier: identifier) { tab in tab.badgeValue = badgeValue tab.userInfo = identifier return self.configViewController(viewController: viewController, title: title) } return tab } // MARK: Configure UISearchTab func configSearchTab(_ viewController: UIViewController, title: String) -> UISearchTab { // UISearchTab - separated from TabBar and displayed independently let searchTab = UISearchTab { tab in viewController.view.backgroundColor = .init(red: .random(in: 0 ... 1), green: .random(in: 0 ... 1), blue: .random(in: 0 ... 1), alpha: 1.0) return self.configViewController(viewController: viewController, title: title) } return searchTab } // MARK: Configure UIViewController func configViewController(viewController: UIViewController, title: String) -> UINavigationController { let navigationController = UINavigationController(rootViewController: viewController) viewController.navigationItem.title = title return navigationController } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Oct ’25
Reply to UITabBar Appears During Swipe-Back Gesture on iOS 26 Liquid Glass UI
@DTS Engineer I tested with Xcode 26.1 and iOS 26.1 RC simulator, and the same issue still occurs. In my setup, ViewController A pushes ViewController B with hidesBottomBarWhenPushed = true. The transition looks fine at first, but as soon as the back-swipe gesture starts, the tab bar reappears immediately. When I build the same code with Xcode 26.1 and iOS 18.4 simulator, everything works normally as before.
Topic: UI Frameworks SubTopic: UIKit Tags:
Nov ’25