Contents

AppKit integration

Add AppKit views to your SwiftUI app, or use SwiftUI views in your AppKit app.

Overview

Integrate SwiftUI with your app’s existing content using hosting controllers to add SwiftUI views into AppKit interfaces. A hosting controller wraps a set of SwiftUI views in a form that you can then add to your storyboard-based app.

[Image]

You can also add AppKit views and view controllers to your SwiftUI interfaces. A representable object wraps the designated view or view controller, and facilitates communication between the wrapped object and your SwiftUI views.

For design guidance, see Designing for macOS in the Human Interface Guidelines.

Topics

Displaying SwiftUI views in AppKit

Adding AppKit views to SwiftUI view hierarchies

Adding AppKit gesture recognizers into SwiftUI view hierarchies

See Also

Framework integration