SwiftUI UIKit
Asked on 10/07/2024
1 search
Apple's WWDC 2024 sessions highlighted several key advancements in the interoperability between SwiftUI and UIKit. SwiftUI now offers seamless integration with UIKit and AppKit, allowing developers to use views and view controllers from these frameworks within SwiftUI applications. This is achieved through protocols like UIViewRepresentable
, which facilitate the creation and updating of UIKit views using SwiftUI's declarative syntax. Conversely, SwiftUI views can be embedded into UIKit or AppKit hierarchies using classes such as HostingViewController
.
Additionally, UIKit has been enhanced to support SwiftUI animations, enabling developers to animate UIKit views using SwiftUI's animation types. This includes the ability to create fluid gesture-driven animations with SwiftUI's spring animation, maintaining continuous velocity across interactive and non-interactive parts of animations.
For more detailed insights, you can refer to the sessions:
- Platforms State of the Union (35:12) for an overview of UI framework integration.
- SwiftUI essentials (20:30) for details on SDK interoperability.
- What’s new in UIKit (03:35) for updates on using SwiftUI animations in UIKit.

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.

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

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.