Does Xcode previews support UIKit?

Generated on 9/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.

Platforms State of the Union

Platforms State of the Union

Discover the newest advancements on Apple platforms.

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.

Evolve your document launch experience

Evolve your document launch experience

Make your document-based app stand out, and bring its unique identity into focus with the new document launch experience. Learn how to leverage the new API to customize the first screen people see when they launch your app. Utilize the new system-provided design, and amend it with custom actions, delightful decorative views, and impressive animations.

What’s new in UIKit

What’s new in UIKit

Explore everything new in UIKit, including tab and document launch experiences, transitions, and text and input changes. We’ll also discuss better-than-ever interoperability between UIKit and SwiftUI animations and gestures, as well as general improvements throughout UIKit.

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.