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

# UIToolbar

A control that displays one or more buttons along an edge of your interface.

```
@MainActor class UIToolbar
```

## Overview

To create toolbar items, use the [`UIBarButtonItem`](/documentation/UIKit/UIBarButtonItem) class. To add toolbar items to a toolbar, use the [`setItems(_:animated:)`](/documentation/UIKit/UIToolbar/setItems(_:animated:)) method.

Toolbar images that represent normal and highlighted states of an item derive from the image you set using the inherited [`image`](/documentation/UIKit/UIBarItem/image) property from the [`UIBarItem`](/documentation/UIKit/UIBarItem) class. The toolbar’s [`tintColor`](/documentation/UIKit/UIToolbar/tintColor) colors the image.

If you need radio button style controls, use the [`UITabBar`](/documentation/UIKit/UITabBar) class instead of [`UIToolbar`](/documentation/UIKit/UIToolbar).

When the system presents the toolbar with Liquid Glass:

- Don’t apply custom backgrounds or appearances to [`UIToolbar`](/documentation/UIKit/UIToolbar). Instead, let the system determine the background appearance.
- Don’t use `UIToolbar` directly when you present your view controller with a [`UINavigationController`](/documentation/UIKit/UINavigationController). Instead, set [`toolbarItems`](/documentation/UIKit/UIViewController/toolbarItems) to get system-provided transitions and animations in your toolbar.

> Note: In iOS 18 and earlier, you use the methods listed in <doc://com.apple.uikit/documentation/UIKit/UIToolbar#Customizing-appearance> to customize the appearance of toolbars. You send the setter messages to the appearance proxy (`UIToolbar.appearance()` in Swift or `[UIToolbar appearance]` in Objective-C) to customize all toolbars, or to a specific `UIToolbar` instance. If a property is dependent on the bar metrics, specify a value for ``doc://com.apple.uikit/documentation/UIKit/UIBarMetrics/default`` as well as for ``doc://com.apple.uikit/documentation/UIKit/UIBarMetrics/compact``.

### Split the toolbar’s shared background

By default, the system organizes all of the buttons you provide into one grouping that shares a background in the toolbar. To split buttons into different groupings with separate shared backgrounds, add [`fixedSpace()`](/documentation/UIKit/UIBarButtonItem/fixedSpace()) between buttons to indicate where you want to split the shared background.

For a button that finalizes or completes a task, set the button’s style to [`UIBarButtonItem.Style.prominent`](/documentation/UIKit/UIBarButtonItem/Style-swift.enum/prominent) so that the system can avoid visually grouping the button with other buttons.

## Topics

### Managing toolbar changes

[`delegate`](/documentation/UIKit/UIToolbar/delegate)

The toolbar’s delegate object.

[`UIToolbarDelegate`](/documentation/UIKit/UIToolbarDelegate)

The interface that toolbar delegate objects implement to manage the toolbar behavior.

### Configuring toolbar items

[`items`](/documentation/UIKit/UIToolbar/items)

The items displayed on the toolbar.

[`setItems(_:animated:)`](/documentation/UIKit/UIToolbar/setItems(_:animated:))

Sets the items on the toolbar by animating the changes.

### Customizing appearance

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

The appearance settings to use for a standard-height toolbar.

[`compactAppearance`](/documentation/UIKit/UIToolbar/compactAppearance)

The appearance settings to use for a compact-height toolbar.

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

The appearance settings for a standard-height toolbar when the edge of scrollable content aligns with the edge of the toolbar.

[`compactScrollEdgeAppearance`](/documentation/UIKit/UIToolbar/compactScrollEdgeAppearance)

The appearance settings for a compact-height toolbar when the edge of any scrollable content aligns with the edge of a compact-height toolbar.

[`isTranslucent`](/documentation/UIKit/UIToolbar/isTranslucent)

A Boolean value that indicates whether the toolbar is translucent.

[Legacy customizations](/documentation/UIKit/uitoolbar-legacy-customizations)

Customize appearance information directly on the toolbar object.



---

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)