Can I opt out of the new TabBar in SwiftUI

Asked on 2024-07-17

1 search

Yes, you can opt out of the new TabBar in SwiftUI. The new TabView syntax in SwiftUI introduced in iOS 18 allows for a more integrated appearance and easier error catching at build time. However, if you prefer not to use the new TabBar, you can customize your app to use a sidebar instead.

To enable the sidebar with TabView in SwiftUI, you can set the TabView style to be sidebar adaptable. This allows your app to switch between a tab bar and a sidebar representation, providing flexibility in how your app's navigation is presented.

For more details, you can refer to the session Elevate your tab and sidebar experience in iPadOS at the 06:20 mark.