<!--
{
  "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/UIBarItem",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIBarItem"
  },
  "title" : "UIBarItem"
}
-->

# UIBarItem

An abstract superclass for items that you can add to a bar that appears at the bottom of the screen.

```
@MainActor class UIBarItem
```

## Overview

Items on a bar behave in a way similar to buttons (instances of [`UIButton`](/documentation/UIKit/UIButton)). They have a title, image, action, and target. You can also enable and disable an item on a bar.

### Customize appearance

You can customize the image to represent the item, and the position of the image, using [`image`](/documentation/UIKit/UIBarItem/image) and [`imageInsets`](/documentation/UIKit/UIBarItem/imageInsets) respectively.

You can also specify a custom image and position to use in landscape orientation when using the iPhone appearance idiom using [`landscapeImagePhone`](/documentation/UIKit/UIBarItem/landscapeImagePhone) and [`landscapeImagePhoneInsets`](/documentation/UIKit/UIBarItem/landscapeImagePhoneInsets) respectively. In addition, you can customize the title’s text attributes using [`setTitleTextAttributes(_:for:)`](/documentation/UIKit/UIBarItem/setTitleTextAttributes(_:for:)), either for a single item, or for all items by using the appearance proxy (for example, `[UIBarItem appearance]`).

## Topics

### Creating a bar item

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

Initializes the bar item to its default state.

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

Creates a bar item from data in an unarchiver.

### Getting and setting properties

[`title`](/documentation/UIKit/UIBarItem/title)

The title displayed on the item.

[`image`](/documentation/UIKit/UIBarItem/image)

The image used to represent the item.

[`landscapeImagePhone`](/documentation/UIKit/UIBarItem/landscapeImagePhone)

The image to use to represent the item in landscape orientation when using the iPhone appearance idiom.

[`largeContentSizeImage`](/documentation/UIKit/UIBarItem/largeContentSizeImage)

The image to display for users who are blind or have low vision.

[`imageInsets`](/documentation/UIKit/UIBarItem/imageInsets)

The image inset or outset for each edge.

[`landscapeImagePhoneInsets`](/documentation/UIKit/UIBarItem/landscapeImagePhoneInsets)

The image inset or outset for each edge of the image in landscape orientation when using the iPhone appearance idiom.

[`largeContentSizeImageInsets`](/documentation/UIKit/UIBarItem/largeContentSizeImageInsets)

The insets to apply to the bar item’s large image when displaying the image in an assistive UI.

[`isEnabled`](/documentation/UIKit/UIBarItem/isEnabled)

A Boolean value indicating whether the item is enabled.

[`tag`](/documentation/UIKit/UIBarItem/tag)

The bar item’s tag, an app-supplied integer that you can use to identify bar item objects in your app.

### Customizing appearance

[`setTitleTextAttributes(_:for:)`](/documentation/UIKit/UIBarItem/setTitleTextAttributes(_:for:))

Sets the title’s text attributes for a given control state.

[`titleTextAttributes(for:)`](/documentation/UIKit/UIBarItem/titleTextAttributes(for:))

Returns the title’s text attributes for a given control state.



---

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)