.tabViewStyle(.sidebarAdaptable)
Asked on 06/14/2025
1 search
The .tabViewStyle(.sidebarAdaptable)
modifier in SwiftUI allows you to create a flexible tab view that can switch between a tab bar and a sidebar representation. This feature is particularly useful for apps with a lot of content, as it provides a more customizable and adaptable user interface.
In iOS 18, the sidebar has become more flexible, allowing users to reorder items and hide infrequently used options. The new type-safe syntax in SwiftUI makes it easier to catch common errors at build time. You can apply the new sidebar adaptable tab view style to make your tab view more flexible, enabling users to switch between the tab bar and the sidebar view. This is especially beneficial for apps with rich hierarchies, as it allows for a more organized and user-friendly navigation experience.
For more details, you can refer to the session What’s new in SwiftUI (00:01:02) and Elevate your tab and sidebar experience in iPadOS (00:06:16).

What’s new in SwiftUI
Learn how you can use SwiftUI to build great apps for any Apple platform. Explore a fresh new look and feel for tabs and documents on iPadOS. Improve your window management with new windowing APIs, and gain more control over immersive spaces and volumes in your visionOS apps. We’ll also take you through other exciting refinements that help you make expressive charts, customize and layout text, and so much more.

Migrate your TVML app to SwiftUI
SwiftUI helps you build great apps on all Apple platforms and is the preferred toolkit for bringing your content into the living room with tvOS 18. Learn how to use SwiftUI to create familiar layouts and controls from TVMLKit, and get tips and best practices.

Elevate your tab and sidebar experience in iPadOS
iPadOS 18 introduces a new navigation system that gives people the flexibility to choose between using a tab bar or sidebar. The newly redesigned tab bar provides more space for content and other functionality. Learn how to use SwiftUI and UIKit to enable customization features – like adding, removing and reordering tabs – to enable a more personal touch in your app.