navigationsplitview

Asked on 08/05/2024

2 searches

NavigationSplitView is a key component in SwiftUI for creating complex navigation structures, such as sidebars and tab bars, across different Apple platforms. Here are some relevant details from the WWDC 2024 sessions:

  1. Migrate your TVML app to SwiftUI:

    • The floating sidebar from the TV app is now available system-wide in tvOS 18 through SwiftUI. You can build it using the existing NavigationSplitView APIs. This allows for a sidebar with a translucent appearance and compact indicator, which can be adopted with minimal code changes. (Migrate your TVML app to SwiftUI)
  2. What’s new in SwiftUI:

    • The sidebar in iOS 18 has become more flexible, allowing for easy switching between a tab bar and a sidebar representation. This is particularly useful for apps with a lot of content, as it supports customization behaviors like reordering and removing tabs. (What’s new in SwiftUI)
    • The refreshed sidebar looks great on tvOS and can be styled to appear as a sidebar or segmented control in the toolbar. (What’s new in SwiftUI)
  3. Elevate your tab and sidebar experience in iPadOS:

    • New in iPadOS 18, tab bars can now optionally be displayed as a sidebar with several enhancements. When the sidebar is hidden, it animates back into the tab bar, bringing focus back to the content. This is great for content-rich apps with rich hierarchies. (Elevate your tab and sidebar experience in iPadOS)
  4. Platforms State of the Union:

    • The redesigned tab bar in iOS 18 floats at the top of your app and can turn into a sidebar for deeper navigation. This is useful for apps with both simple and deep hierarchies, allowing for a seamless transition between tab bar and sidebar. (Platforms State of the Union)
  5. What’s new in UIKit:

    • The new UI Tab and UI Tab group APIs enable apps to describe their structure to build a tab bar and sidebar, adapting for a native experience on both Mac Catalyst and visionOS. (What’s new in UIKit)

For more detailed information, you can refer to the specific sessions mentioned above.