what's new with navigation in SwiftUI ?

Generated on 8/22/2024

1 search

In the "What's new in SwiftUI" session at WWDC 2024, several enhancements to navigation in SwiftUI were introduced. These include:

  1. Scrolling Enhancements: SwiftUI now offers more programmatic control over scroll views. You can react to changes in content, offsets, and content size with the onScrollGeometryChange modifier. This allows for dynamic interactions, such as showing a button when scrolling past a certain point. Additionally, you can detect when a view's visibility changes due to scrolling, enabling experiences like auto-playing videos when content comes into view. There are also new options for controlling scroll positions, such as scrolling to the top edge, and more control over content alignment and scrolling behavior.

  2. Tab and Sidebar Flexibility: The sidebar in iOS 18 has become more flexible, allowing users to switch between a tab bar and a sidebar representation. The tab bar can now float above the content, and users can customize the experience by reordering items and hiding infrequently used options. This is achieved using the new type-safe syntax for TabView in SwiftUI, which helps catch common errors at build time.

  3. Zoom Navigation Transition: A new Zoom navigation transition has been introduced, which can be used to create visually appealing transitions when expanding information within an app.

For more details, you can refer to the session What’s new in SwiftUI (16:18).

What’s new in AppKit

What’s new in AppKit

Discover the latest advances in Mac app development. Get an overview of the new features in macOS Sequoia, and how to adopt them in your app. Explore new ways to integrate your existing code with SwiftUI. Learn about the improvements made to numerous AppKit controls, like toolbars, menus, text input, and more.

Elevate your tab and sidebar experience in iPadOS

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.

SwiftUI essentials

SwiftUI essentials

Join us on a tour of SwiftUI, Apple’s declarative user interface framework. Learn essential concepts for building apps in SwiftUI, like views, state variables, and layout. Discover the breadth of APIs for building fully featured experiences and crafting unique custom components. Whether you’re brand new to SwiftUI or an experienced developer, you’ll learn how to take advantage of what SwiftUI has to offer when building great apps.

Migrate your TVML app to SwiftUI

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.

Enhance your UI animations and transitions

Enhance your UI animations and transitions

Explore how to adopt the zoom transition in navigation and presentations to increase the sense of continuity in your app, and learn how to animate UIKit views with SwiftUI animations to make it easier to build animations that feel continuous.

Platforms State of the Union

Platforms State of the Union

Discover the newest advancements on Apple platforms.

What’s new in SwiftUI

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.