Initializer

init(coder:rootView:)

Creates a hosting controller object from an archive and the specified SwiftUI view.

Declaration

init?(coder aDecoder: NSCoder, rootView: Content)

Parameters

coder

The decoder to use during initialization.

rootView

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

Return Value

A UIViewController object that you can present from your interface.

See Also

Creating a Hosting Controller Object

init(rootView: Content)

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

init(nibName: String?, bundle: Bundle?)

Creates a hosting controller object from the contents of the specified nib file.

init?(coder: NSCoder)

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