We are trying to write an iOS app that supports regular and constrained widths using a TabView with .tabViewStyle(.sidebarAdaptable)
. On the surface this seems like a great way to write an app that supports all the different widths that your app may run in. Especially since Stage Manager and Apple Vision have made it easy for users to resize your apps window while it is running.
We are facing many challenges though. I will give a brief one liner of each below, but to truly experience them you need to run the sample app, or watch the sample videos included.
Issues
Basic TabView Issues
- Double Navigation Bar: When tabs are collapsed into a "More" tab, there's an unwanted double navigation bar
- Selection Sync: Tab selection gets out of sync when switching between narrow/wide layouts through the "More" tab
TabView Crash
- Fatal crash occurs when resizing window to narrow width while Tab 5 is selected
- Error:
SwiftUI/SidebarAdaptableTabViewStyle_iOS.swift:482: Fatal error: Tried to update with invalid selection value
Section Handling Issues
- Section Display Bug: Bottom tabs incorrectly show section names instead of tab names in narrow width
- Tab Selection Mismatch: Tab identifiers don't match selected tabs in narrow width mode
Customization Issues
- Inconsistent "Edit" button behavior in More tab
- Unable to properly disable tab customization
Sample app and video
https://github.com/copia-wealth-studios/swiftui-tabview-sample