What was new in SwiftUI
Asked on 07/31/2024
1 search
What's New in SwiftUI
SwiftUI has introduced a variety of new features and improvements this year. Here are some of the highlights:
-
Graphics Capabilities:
- New mix modifier on color to blend colors.
- Extended custom shader feature with precompilation to avoid frame drops.
-
Scroll View Enhancements:
- Fine-grained control over scroll views.
- New
onScrollGeometryChange
to react to changes in content, offsets, and content size. - Detect when a view's visibility changes due to scrolling.
- More programmatic control over scroll positions and content alignment.
-
Swift 6 Language Mode:
- Compile-time data race safety.
- Views in SwiftUI are now marked with the
@MainActor
annotation.
-
Interoperability:
- Improved integration with UIKit and AppKit.
- Gesture recognition and animations can now be shared between SwiftUI and UIKit/AppKit views.
-
Xcode Previews:
- New dynamic linking architecture for smoother workflow.
@Previewable
macro to use dynamic properties like state directly in previews.
-
Customizations:
- Custom hover effects for visionOS.
- New options to customize window behavior and styling in macOS.
- New text renderer API for advanced visual effects and animations.
-
Accessibility:
- Enhanced accessibility labels.
- Conditional modifier support and app intent-based accessibility actions.
-
New APIs and Tools:
- Custom containers, mesh gradients, and scrolling customizations.
- Programmatic access to text selection within text editing controls.
For a detailed overview, you can watch the session What’s new in SwiftUI.
Relevant Sessions
These sessions cover the new features and improvements in SwiftUI, providing a comprehensive look at what's new and how you can leverage these updates in your apps.

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.

Platforms State of the Union
Discover the newest advancements on Apple platforms.

What’s new in watchOS 11
Explore new opportunities on Apple Watch, including bringing Double Tap support to your watchOS app, making your Smart Stack widgets even more relevant and interactive, and displaying your iOS Live Activities in the Smart Stack.