Instance Method

viewDidLoad()

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

Declaration

func viewDidLoad()

Discussion

This method is called after the view controller has loaded its view hierarchy into memory. This method is called regardless of whether the view hierarchy was loaded from a nib file or created programmatically in the loadView() method. You usually override this method to perform additional initialization on views that were loaded from nib files.

See Also

Managing the View

var view: UIView!

The view that the controller manages.

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 loadViewIfNeeded()

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

var viewIfLoaded: UIView?

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

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.