Instance Property

items

The items displayed by the tab bar.

Declaration

@property(nonatomic, copy) NSArray<UITabBarItem *> *items;

Discussion

This property contains an array of UITabBarItem objects, each of which corresponds to a tab displayed by the tab bar. The order of the items in this property corresponds to the order of the items onscreen. You can use this property to access the items as needed.

For tab bars you create, you can assign a new set of items to this property to change the displayed items. Changing the items replaces them immediately without animations. You must not modify this property if the tab bar is managed by a UITabBarController object, and doing so raises an exception. When the tab bar is owned by a tab bar controller, use the tab bar controller’s methods to make changes.

The default value of this property is nil.

See Also

Configuring Tab Bar Items

- setItems:animated:

Sets the items on the tab bar, optionally animating any changes into position.

selectedItem

The currently selected item on the tab bar.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software