Hi,
On iPhone Duo, the vertical tab bar (side bar) shows no tabs after a full-screen modal closes. This happens when the device opened while the modal showed. I filed it as FB25719774.
Environment: Xcode 27.2, iPhone Duo simulator, iOS 27.2 (24B91016s).
Setup: A container view controller holds a UITabBarController as a child. Auto Layout constraints pin the child view to the 4 edges of the container.
override func viewDidLoad() {
super.viewDidLoad()
addChild(child)
child.view.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(child.view)
NSLayoutConstraint.activate([
child.view.topAnchor.constraint(equalTo: view.topAnchor),
child.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
child.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
child.view.bottomAnchor.constraint(equalTo: view.bottomAnchor)
])
child.didMove(toParent: self)
}
Steps:
- Fold the device. The side bar shows 4 tabs.
- Present a view controller with modalPresentationStyle = .fullScreen.
- While the modal shows, open the device flat.
- Close the modal.
Expected: The side bar shows the 4 tabs, as it did before the modal.
Actual: The side bar is empty.
The child gets the right frame one layout pass later. But the side bar stays empty, even though tabBar is not hidden and has a normal frame.
Workaround: Size the child view with an autoresizing mask while the container is off the window:
child.view.frame = view.bounds
child.view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
However, we could not use the mask all the time. On iOS 17.5, it caused a second issue: after a rotation, a compositional layout inside the child kept the old size classes (FB25719805). So we turn on the mask only while the container is off the window.
Related: FB25261013 (https://developer.apple.com/forums/thread/852478) shows the same empty side bar. There, the UITabBarController is added as a child with constraints while the Duo is open. In both cases, Auto Layout has not updated the child frame yet when UIKit sets up the side bar.
Link to demo project here: https://transfer.it/t/jd07S2pjxb6A