Edit

Share via


UIViewController.LoadView Method

Definition

Initializes the View property.

[Foundation.Export("loadView")]
public virtual void LoadView();
abstract member LoadView : unit -> unit
override this.LoadView : unit -> unit
Attributes

Remarks

This method should not be called directly. It is called when the View property is accessed and lazily initialized. Generally, the appropriate UIView will be loaded from a nib file, but application developers may override it to create a custom UIView. This method should not be overridden to provide general initialization on loading a view, that belongs in the ViewDidLoad() method.

<block subset="none" type="overrides">

  • Overriders who create a custom UIView should not call base.LoadView().:
  • Overriders should assign the custom UIView to the View property.:
  • The UIViews created by this method must not be shared with other UIViewControllers. :
</block>

Applies to

See also