UIViewController.NavigationItem Property

Definition

A UINavigationItem that represents this UIViewController in its parent’s UINavigationController’s NavigationBar.

public virtual UIKit.UINavigationItem NavigationItem { [Foundation.Export("navigationItem", ObjCRuntime.ArgumentSemantic.Strong)] get; }
member this.NavigationItem : UIKit.UINavigationItem

Property Value

By default, the first time this property is accessed, a new UINavigationItem is lazily initialized with a Title set to this UIViewController’s Title.'

Attributes

Remarks

When a UIViewController is a child of a UIViewController that has a UINavigationController, the child’s NavigationItem represents the UINavigationItem in the parent’s UINavigationBar. The first time this property is accessed, the default behavior is to lazily initialize a UINavigationItem, so if the parent UIViewController does not use a UINavigationBar, application developers should either not access or override this property.

Applies to