Hi,
I have an app with a specific view hierarchy, and when I tested it on an iPhone Duo in landscape, I noticed an issue with how the tab bar is displayed or, rather, how it isn’t displayed.
On iPhone Duo in landscape and on the main screen, the tab bar for a UITabBarController pushed onto a UINavigationController (itself inside another UITabBarController) isn’t visible.
I've tested it in both UIKit and SwiftUI, and the issue is present in both.
I could only get the tab bar to appear by presenting the view modally instead of pushing it, but that isn’t a viable solution for my app.
For example:
UIWindow
└─ RootTabBarController (UITabBarController)
└─ UINavigationController (tab 2)
├─ FirstTabViewController (root)
└─ push
└─ NestedTabBarController (UITabBarController)
├─ ItemListViewController (UITableView)
├─ ItemListViewController (UITableView)
└─ ItemListViewController (UITableView)
I've put together a simplified demo repo that shows the problem.
I've attached two images showing that the tabs disappear in landscape mode and are visible in portrait mode.
Can we preserve the original functionality?