Initializer

init(nibName:bundle:)

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

Declaration

@objc override dynamic init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?)

Parameters

nibNameOrNil

The name of the nib file containing the UIKit view controller. Do not include a filename extension or leading path information as part of the name. If you specify nil, you must assign a valid view to the rootView property before accessing the view controller's view property.

nibBundleOrNil

The bundle in which to search for the nib file. If you specify nil, this method looks for the file in the main bundle.

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?(coder: NSCoder, rootView: Content)

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

init?(coder: NSCoder)

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