how do you use the new navigationsplitview
Generated on 8/9/2024
1 search
To use the new NavigationSplitView
in SwiftUI, you can follow the guidance provided in the WWDC sessions. Here are some key points and sessions that discuss the new navigation features:
-
Adopting the Sidebar Appearance:
- In tvOS 18, the floating sidebar from the TV app is now available system-wide through SwiftUI. You can build it using the existing
NavigationSplitView
APIs. If your app is currently using a tab bar, you can switch to this appearance with just one line of code by setting aTabView
style ofsidebarAdaptable
. This will make your tab bar appear as a sidebar. - Migrate your TVML app to SwiftUI (14:22)
- In tvOS 18, the floating sidebar from the TV app is now available system-wide through SwiftUI. You can build it using the existing
-
Flexible Sidebar and Tab Bar:
- In iOS 18, the sidebar has become more flexible. You can easily switch between a tab bar and a sidebar representation. The new
TabView
has a type-safe syntax in SwiftUI, making it easier to catch common errors at build time. You can apply the newsidebarAdaptable
tab view style to make your tab view more flexible. - What’s new in SwiftUI (01:02)
- In iOS 18, the sidebar has become more flexible. You can easily switch between a tab bar and a sidebar representation. The new
-
Enhanced Sidebar and Tab Bar Experience:
- The new tab bar can float above the content and morph into a sidebar for deeper navigation. This is useful for apps with a simple hierarchy or a deeper hierarchy, allowing you to implement both a tab bar and sidebar with the same API.
- Platforms State of the Union (47:40)
-
Customization and Flexibility:
- The sidebar supports customization features like reordering and removing tabs, which is programmatically controllable. This makes it great for content-rich apps.
- What’s new in SwiftUI (01:57)
-
Best Practices for Tab and Sidebar Navigation:
- For best practices on tab bar navigation and to learn more about sidebars, you can watch the session on improving your tab and sidebar experience on iPad.
- Elevate your tab and sidebar experience in iPadOS (02:07)
By following these guidelines and utilizing the new APIs, you can effectively use NavigationSplitView
to create a flexible and customizable navigation experience in your SwiftUI apps.
What’s new in UIKit
Explore everything new in UIKit, including tab and document launch experiences, transitions, and text and input changes. We’ll also discuss better-than-ever interoperability between UIKit and SwiftUI animations and gestures, as well as general improvements throughout UIKit.
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.
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.
Xcode essentials
Edit, debug, commit, repeat. Explore the suite of tools in Xcode that help you iterate quickly when developing apps. Discover tips and tricks to help optimize and boost your development workflow.
Evolve your document launch experience
Make your document-based app stand out, and bring its unique identity into focus with the new document launch experience. Learn how to leverage the new API to customize the first screen people see when they launch your app. Utilize the new system-provided design, and amend it with custom actions, delightful decorative views, and impressive animations.
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.
Platforms State of the Union
Discover the newest advancements on Apple platforms.