Give me the new apis for tabs

Asked on 06/11/2025

1 search

Apple introduced several new APIs for tabs at WWDC, focusing on enhancing the tab and sidebar experience across different platforms. Here are some of the key updates:

  1. SwiftUI Tab View Enhancements:

    • A new syntax in SwiftUI for TabView makes it easier to catch common errors at build time. You declare a tab struct with a title, image, and content view, and optionally include a selection value for programmatic selection. This ensures all tabs have the same selection type and match the TabView itself.
    • A new API allows adding a custom bottom accessory alongside the tab bar, which is useful for displaying playback controls or global status. This integrates with another API that collapses the tab bar when scrolling, providing more space for content.
  2. UIKit Tab and Sidebar APIs:

    • New UI Tab and UI Tab Group APIs enable apps to describe their structure for building a tab bar and sidebar. These APIs adapt for a native experience on both Mac Catalyst and visionOS.
    • The tab bar and sidebar can be customized through drag and drop, allowing users to personalize their experience by rearranging or hiding non-essential tabs.
  3. Customization and Adaptivity:

    • Tabs can be customized to allow rearrangement and visibility changes, with these customizations automatically persisted. This is similar to the toolbar customizations introduced in iPadOS 16.
    • The tab bar can morph into a sidebar, providing a more integrated appearance and allowing for deeper navigation within apps.

For more detailed information, you can refer to the session Elevate your tab and sidebar experience in iPadOS (00:03:56) which covers these updates extensively.