UIViewController.TabBarItem Property

Definition

A UITabBarItem that represents this UIViewController in its parent’s UITabBarController’s TabBar.

public virtual UIKit.UITabBarItem TabBarItem { [Foundation.Export("tabBarItem", ObjCRuntime.ArgumentSemantic.Strong)] get; [Foundation.Export("setTabBarItem:", ObjCRuntime.ArgumentSemantic.Strong)] set; }
member this.TabBarItem : UIKit.UITabBarItem with get, set

Property Value

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

Attributes

Remarks

When a UIViewController is a descendant of a UITabBarController, the child’s TabBarItem represents the UITabBarItem in the ancestor’s P:UIKit.UITabBarController.UITabBar. The first time this property is accessed, the default behavior is to lazily initialize a UITabBarItem, so if there is no ancestor UITabBarController, application developers should either not access or override this property.

Applies to