I have a strange issue for iOS26. I have a UITabBarController at the root view of the app, but on certain actions, I want to hide it temporarily, and then have some options where the user can press a button which display some options using UIAlertController. It used to work fine before, but with iOS26, when the UIAlertController is presented, the tab bar (which is hidden by setting the ‘frame’) suddenly pops back into view automatically, when I don't want it to.
Here's an example that reproduces the issue:
class TestTableViewController: UITableViewController {
private var isEditMode: Bool = false
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
self.navigationItem.leftBarButtonItem = UIBarButtonItem(title: "Change", style: .plain, target: self, action: #selector(changeMode))
}
@objc func changeMode() {
print("change mode called")
if isEditMode == false {
isEditMode = true
// hide tab bar
setEditingBarVisible(true, animated: true)
self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Action", style: .plain, target: self, action: #selector(showActionsList))
} else {
isEditMode = false
// show tab bar
setEditingBarVisible(false, animated: true)
self.navigationItem.rightBarButtonItem = nil
}
}
@objc func showActionsList() {
let alert = UIAlertController(title: "Action", message: "showing message", preferredStyle: .actionSheet)
alert.addAction(UIAlertAction.init(title: "Cancel", style: .cancel, handler: nil))
self.present(alert, animated: true, completion: nil)
}
@objc func setEditingBarVisible(_ visible: Bool, animated: Bool) {
guard let tabBar = tabBarController?.tabBar else {
return
}
let performChanges = {
// Slide the tab bar off/on screen by adjusting its frame’s y.
// This is safe because UITabBar is frame-managed, not Auto Layout constrained.
var frame = tabBar.frame
let height = frame.size.height
if visible {
// push it down if not already
if frame.origin.y < self.view.bounds.height {
frame.origin.y = self.view.bounds.height + self.view.safeAreaInsets.bottom
}
// Give our content its full height back (remove bottom safe-area padding that tab bar created)
self.additionalSafeAreaInsets.bottom = 0
} else {
// bring it back to its normal spot
frame.origin.y = self.view.bounds.height - height
// Re-apply bottom safe-area so content clears the tab bar again
self.additionalSafeAreaInsets.bottom = height
}
tabBar.frame = frame
// Ensure layout updates during animation
self.tabBarController?.view.layoutIfNeeded()
self.view.layoutIfNeeded()
}
if animated {
UIView.animate(withDuration: 0.28, delay: 0, options: [.curveEaseInOut]) {
performChanges()
}
} else {
performChanges()
}
}
}
I have a bar button called 'Change', and selecting it should hide/show the UITabBar at the bottom, and show/hide a different bar button called 'Action'. Selecting the 'Action' button shows an alert.
With iOS26, with the tab bar moved out of view, when the 'Action' button is called, the alert shows but the tab bar automatically moves into view as well.
Is this a known issue? Any workaround for it?
I filed FB19954757 just in case.