Initializer

init(rootView:)

Creates a hosting view object that wraps the specified SwiftUI view.

Declaration

required init(rootView: Content)

Parameters

rootView

The root view of the SwiftUI view hierarchy that you want to manage using this hosting controller.

Return Value

An NSHostingView object initialized with the specified SwiftUI view.

See Also

Creating a Hosting View

init?(coder: NSCoder)

Creates a hosting view object from the contents of the specified archive.

init(frame: NSRect)

Initializes and returns a newly allocated AppKit view with a specified frame rectangle.