whats new in WWDC24 Swiftui?

Asked on 06/17/2025

1 search

At WWDC24, several exciting updates were introduced for SwiftUI. Here are some of the highlights:

  1. Graphics Capabilities: SwiftUI now includes a new mix modifier on colors, allowing you to blend colors beautifully. Additionally, custom shaders can be precompiled to avoid frame drops caused by lazy shader compilation.

  2. Scroll View Enhancements: New APIs provide fine-grained control over scroll views. You can now react to changes in content, offsets, and content size with the onScrollGeometryChange feature. This allows for experiences like auto-playing videos when content moves on or off the screen.

  3. Custom Containers: SwiftUI has introduced APIs that make it easier to create custom container views. You can iterate over subviews and wrap them in custom views, similar to built-in containers like List and Picker.

  4. Accessibility Improvements: SwiftUI now supports additional accessibility features, such as conditional modifier support and app intent-based accessibility actions.

  5. Xcode Previews: A new dynamic linking architecture in Xcode Previews allows for faster iteration by using the same build artifacts for previews and builds. The previewable macro lets you use state directly in previews, reducing boilerplate code.

  6. Swift 6 Language Mode: SwiftUI has improved its APIs to support the new Swift 6 language mode, which includes compile-time data race safety.

  7. Interoperability: SwiftUI now offers better interoperability with UIKit and AppKit, allowing for custom animations and gesture recognizers to be used across frameworks.

For more detailed information, you can check out the session What’s new in SwiftUI (00:00:07).