Does Xcode previews support UIKit?

Asked on 09/16/2024

1 search

Yes, Xcode Previews does support UIKit. The interoperability between SwiftUI and UIKit has been enhanced, allowing for better integration. This includes the ability to use UIKit gesture recognizers in SwiftUI view hierarchies and setting up animations on UIKit views that can be driven by SwiftUI. This integration is part of the broader effort to ensure that SwiftUI can work seamlessly with existing UIKit and AppKit views, making it easier for developers to adopt SwiftUI in their apps.

For more details, you can refer to the Platforms State of the Union (35:12) session.