<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITabBarItem",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UITabBarItem"
  },
  "title" : "UITabBarItem"
}
-->

# UITabBarItem

An object that describes an item in a tab bar.

```
@MainActor class UITabBarItem
```

## Overview

A tab bar item is a segment of a tab bar that represents a specific section of your app. A tab bar displays one or more items that allow the user to switch between the different sections. The user can select one item at a time.

The most common approach for displaying a tab bar is to use a tab bar controller. The controller’s tab bar displays an item for each view controller you provide when you set the [`viewControllers`](/documentation/UIKit/UITabBarController/viewControllers) property or call the [`setViewControllers(_:animated:)`](/documentation/UIKit/UITabBarController/setViewControllers(_:animated:)) method. You’re responsible for supplying the tab bar items. Do this by setting each view controller’s [`tabBarItem`](/documentation/UIKit/UIViewController/tabBarItem) property. When the user selects an item, the tab bar controller displays its view controller. For more information, see [`UITabBarController`](/documentation/UIKit/UITabBarController).

You can also use a tab bar independent of a tab bar controller. After creating a tab bar, add it to your view hierarchy. Provide the items by setting the tab bar’s [`items`](/documentation/UIKit/UITabBar/items) property or by using the [`setItems(_:animated:)`](/documentation/UIKit/UITabBar/setItems(_:animated:)) method. In this configuration, you’re responsible for updating the view hierarchy to display the correct content. Use [`UITabBarDelegate`](/documentation/UIKit/UITabBarDelegate) to know when the selection changes. For more information, see [`UITabBar`](/documentation/UIKit/UITabBar).

The system provides several tab bar items for common use cases. If you need a custom item, create one with a title and an image. You can further customize the item by providing an alternate image that appears when the user selects it. By default, the item doesn’t display the images you provide. Instead, it generates new images from the alpha values of your images and tints them. To prevent this, provide images that use the [`UIImage.RenderingMode.alwaysOriginal`](/documentation/UIKit/UIImage/RenderingMode-swift.enum/alwaysOriginal) rendering mode.

An item can adjust its appearance when in certain conditions. For example, you can specify different appearances for inline and compact inline layouts or for when the item’s state changes. To do this, set the item’s [`standardAppearance`](/documentation/UIKit/UITabBarItem/standardAppearance) property. If you don’t want this behavior, you can set the individual properties on the item instead.

A tab bar item can display a supplementary value in a badge that provides extra information to the user. For example, the Phone app uses a badge’s value to display the number of missed calls. You can customize the badge’s appearance, including its background color and text attributes.

## Topics

### Creating a tab bar item

[`init(tabBarSystemItem:tag:)`](/documentation/UIKit/UITabBarItem/init(tabBarSystemItem:tag:))

Creates a tab bar item using a system-provided configuration.

[`init(title:image:tag:)`](/documentation/UIKit/UITabBarItem/init(title:image:tag:))

Creates a tab bar item that displays a title and an image.

[`init(title:image:selectedImage:)`](/documentation/UIKit/UITabBarItem/init(title:image:selectedImage:))

Creates a tab bar item that toggles the image it displays when its selected state changes.

[`init()`](/documentation/UIKit/UITabBarItem/init())

Creates a tab bar item with a default configuration.

[`init(coder:)`](/documentation/UIKit/UITabBarItem/init(coder:))

Creates a tab bar item from a serialized instance.

[`UITabBarItem.SystemItem`](/documentation/UIKit/UITabBarItem/SystemItem)

Constants that represent the system tab bar items.

### Configuring the item’s appearance

[`selectedImage`](/documentation/UIKit/UITabBarItem/selectedImage)

The source image the item uses to generate its selected image.

[`standardAppearance`](/documentation/UIKit/UITabBarItem/standardAppearance)

The appearance settings for a tab bar.

[`scrollEdgeAppearance`](/documentation/UIKit/UITabBarItem/scrollEdgeAppearance)

The appearance settings for the tab bar when the edge of scrollable content aligns with the edge of the tab bar.

[`titlePositionAdjustment`](/documentation/UIKit/UITabBarItem/titlePositionAdjustment)

The offset to apply to the title’s position.

### Configuring the item’s badge

[`badgeValue`](/documentation/UIKit/UITabBarItem/badgeValue)

The text that the item’s badge displays.

[`badgeColor`](/documentation/UIKit/UITabBarItem/badgeColor)

The background color of the item’s badge.

[`setBadgeTextAttributes(_:for:)`](/documentation/UIKit/UITabBarItem/setBadgeTextAttributes(_:for:))

Registers text attributes that the badge uses for the specified state.

[`badgeTextAttributes(for:)`](/documentation/UIKit/UITabBarItem/badgeTextAttributes(for:))

Returns the badge’s text attributes for the specified state.

### Deprecated

[`finishedSelectedImage`](/documentation/UIKit/UITabBarItem/finishedSelectedImage)

Returns the finished selected image.

[`finishedUnselectedImage`](/documentation/UIKit/UITabBarItem/finishedUnselectedImage)

Returns the finished unselected image.

[`setFinishedSelectedImage:withFinishedUnselectedImage:`](/documentation/UIKit/UITabBarItem/setFinishedSelectedImage:withFinishedUnselectedImage:)

Sets the finished selected and unselected images.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)