UIViewController.TabBarItem UIViewController.TabBarItem Property

Definition

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

[get: Foundation.Export("tabBarItem", ObjCRuntime.ArgumentSemantic.Strong)]
[set: Foundation.Export("setTabBarItem:", ObjCRuntime.ArgumentSemantic.Strong)]
public virtual UIKit.UITabBarItem TabBarItem { get; 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.'

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