Instance Method

loadViewIfNeeded()

Loads the view controller’s view if it has not yet been loaded.

Declaration

func loadViewIfNeeded()

Discussion

Calling this method loads the view controller’s view from its storyboard file, or creates the view as needed based on the established rules.

See Also

Managing the View

var view: UIView!

The view that the controller manages.

var viewIfLoaded: UIView?

The view controller’s view, or nil if the view is not yet loaded.

var isViewLoaded: Bool

A Boolean value indicating whether the view is currently loaded into memory.

func loadView()

Creates the view that the controller manages.

func viewDidLoad()

Called after the controller'€™s view is loaded into memory.

var title: String?

A localized string that represents the view this controller manages.

var preferredContentSize: CGSize

The preferred size for the view controller’s view.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software