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

# UINavigationItem

The items that a navigation bar displays when the associated view controller is visible.

```
@MainActor class UINavigationItem
```

## Overview

When building a navigation interface, each view controller that you push onto the navigation stack must have a [`UINavigationItem`](/documentation/UIKit/UINavigationItem) object that contains the buttons and views you want to display in the navigation bar. The managing [`UINavigationController`](/documentation/UIKit/UINavigationController) object uses the navigation items of the topmost two view controllers to populate the navigation bar with content.

A navigation item always reflects information about its associated view controller. The navigation item must provide a title to display when the view controller is topmost on the navigation stack. The item can also contain additional buttons to display on the right (or trailing) side of the navigation bar. You can specify buttons and views to display on the left (or leading) side of the toolbar using the [`leftBarButtonItems`](/documentation/UIKit/UINavigationItem/leftBarButtonItems) property, but the navigation controller displays those buttons only when space is available.

To convey additional information about the view that a navigation item represents, use the [`subtitle`](/documentation/UIKit/UINavigationItem/subtitle) property. For example, in a view controller that displays a list of messages, you could use the `subtitle` to indicate the number of unread messages or the last time the app fetched messages. To apply text styles to a navigation item’s title or subtitle, use the [`attributedTitle`](/documentation/UIKit/UINavigationItem/attributedTitle-25fxb), [`attributedSubtitle`](/documentation/UIKit/UINavigationItem/attributedSubtitle-wrjk), and [`largeAttributedSubtitle`](/documentation/UIKit/UINavigationItem/largeAttributedSubtitle-4z2gx) properties.

The [`backBarButtonItem`](/documentation/UIKit/UINavigationItem/backBarButtonItem) property of a navigation item reflects the Back button you want to display when the current view controller is just below the topmost view controller. The Back button doesn’t appear when the current view controller is topmost.

When specifying buttons for a navigation item, you must use [`UIBarButtonItem`](/documentation/UIKit/UIBarButtonItem) objects. If you want to display custom views in the navigation bar, you must wrap those views inside a [`UIBarButtonItem`](/documentation/UIKit/UIBarButtonItem) object before adding them to the navigation item.

## Topics

### Initializing an item

[`init(title:)`](/documentation/UIKit/UINavigationItem/init(title:))

Creates a navigation item with the specified title.

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

Creates a navigation item from data in an unarchiver.

### Configuring the title

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

The navigation item’s title that displays in the navigation bar.

[`attributedTitle`](/documentation/UIKit/UINavigationItem/attributedTitle-25fxb)

[`attributedTitle`](/documentation/UIKit/UINavigationItem/attributedTitle-9l8p2)

An attributed string that is rendered as the title in the navigation bar.

[`largeTitle`](/documentation/UIKit/UINavigationItem/largeTitle)

String to be used as the large title.

[`largeTitleDisplayMode`](/documentation/UIKit/UINavigationItem/largeTitleDisplayMode-swift.property)

The mode for displaying the title of the navigation bar.

[`UINavigationItem.LargeTitleDisplayMode`](/documentation/UIKit/UINavigationItem/LargeTitleDisplayMode-swift.enum)

Constants that indicate how to size the title of this item.

### Configuring the subtitle

[`subtitle`](/documentation/UIKit/UINavigationItem/subtitle)

A string to display as the subtitle in the navigation bar.

[`attributedSubtitle`](/documentation/UIKit/UINavigationItem/attributedSubtitle-wrjk)

[`attributedSubtitle`](/documentation/UIKit/UINavigationItem/attributedSubtitle-4474c)

An attributed string to display as the subtitle in the navigation bar.

[`largeSubtitle`](/documentation/UIKit/UINavigationItem/largeSubtitle)

String to be rendered below the large title.

[`largeAttributedSubtitle`](/documentation/UIKit/UINavigationItem/largeAttributedSubtitle-4z2gx)

[`largeAttributedSubtitle`](/documentation/UIKit/UINavigationItem/largeAttributedSubtitle-2c0pk)

An attributed string to be rendered below the large title.

### Configuring the Back button

[`backBarButtonItem`](/documentation/UIKit/UINavigationItem/backBarButtonItem)

The bar button item for adding a Back button to the navigation bar.

[`backButtonTitle`](/documentation/UIKit/UINavigationItem/backButtonTitle)

The custom title of the Back button.

[`backButtonDisplayMode`](/documentation/UIKit/UINavigationItem/backButtonDisplayMode-swift.property)

The display mode of the Back button.

[`UINavigationItem.BackButtonDisplayMode`](/documentation/UIKit/UINavigationItem/BackButtonDisplayMode-swift.enum)

Constants that describe the display modes of the Back button.

[`hidesBackButton`](/documentation/UIKit/UINavigationItem/hidesBackButton)

A Boolean value that determines whether the navigation item hides the Back button.

[`setHidesBackButton(_:animated:)`](/documentation/UIKit/UINavigationItem/setHidesBackButton(_:animated:))

Hides or shows the Back button, optionally animating the transition.

[`backAction`](/documentation/UIKit/UINavigationItem/backAction)

The back action for the navigation bar.

### Specifying the navigation style

[`style`](/documentation/UIKit/UINavigationItem/style)

A style that determines how the content of the navigation item lays out in the navigation bar.

[`UINavigationItem.ItemStyle`](/documentation/UIKit/UINavigationItem/ItemStyle)

Constants that determine how the content of the navigation item lays out in the navigation bar.

### Specifying custom views

[`centerItemGroups`](/documentation/UIKit/UINavigationItem/centerItemGroups)

Customizable item groups to display in the center section of the navigation bar.

[`leadingItemGroups`](/documentation/UIKit/UINavigationItem/leadingItemGroups)

Item groups to display in the leading section of the navigation bar.

[`trailingItemGroups`](/documentation/UIKit/UINavigationItem/trailingItemGroups)

Item groups to display in the trailing section of the navigation bar.

[`pinnedTrailingGroup`](/documentation/UIKit/UINavigationItem/pinnedTrailingGroup)

The item group to display on the trailing edge of the navigation bar, on the trailing side of the overflow and search items.

[`titleView`](/documentation/UIKit/UINavigationItem/titleView)

A custom view that displays in the center of the navigation bar when the receiver is the top item.

[`subtitleView`](/documentation/UIKit/UINavigationItem/subtitleView)

A custom view to display below the title in the navigation bar.

[`largeSubtitleView`](/documentation/UIKit/UINavigationItem/largeSubtitleView)

A custom view to display below the large title.

[`leftBarButtonItems`](/documentation/UIKit/UINavigationItem/leftBarButtonItems)

An array of custom bar button items to display on the left (or leading) side of the navigation bar when the navigation item is the top item.

[`leftBarButtonItem`](/documentation/UIKit/UINavigationItem/leftBarButtonItem)

A custom bar button item that displays on the left (or leading) edge of the navigation bar when the navigation item is the top item.

[`rightBarButtonItems`](/documentation/UIKit/UINavigationItem/rightBarButtonItems)

An array of custom bar button items to display on the right (or trailing) side of the navigation bar when the navigation item is the top item.

[`rightBarButtonItem`](/documentation/UIKit/UINavigationItem/rightBarButtonItem)

A custom bar button item that displays on the right (or trailing) edge of the navigation bar when the navigation item is the top item.

[`setLeftBarButtonItems(_:animated:)`](/documentation/UIKit/UINavigationItem/setLeftBarButtonItems(_:animated:))

Sets the left bar button items, optionally animating the transition to the new items.

[`setLeftBarButton(_:animated:)`](/documentation/UIKit/UINavigationItem/setLeftBarButton(_:animated:))

Sets the custom bar button item, optionally animating the transition to the new item.

[`setRightBarButtonItems(_:animated:)`](/documentation/UIKit/UINavigationItem/setRightBarButtonItems(_:animated:))

Sets the right bar button items, optionally animating the transition to the new items.

[`setRightBarButton(_:animated:)`](/documentation/UIKit/UINavigationItem/setRightBarButton(_:animated:))

Sets the custom bar button item, optionally animating the transition to the view.

### Getting and setting properties

[`prompt`](/documentation/UIKit/UINavigationItem/prompt)

A single line of text that displays at the top of the navigation bar.

[`leftItemsSupplementBackButton`](/documentation/UIKit/UINavigationItem/leftItemsSupplementBackButton)

A Boolean value that indicates whether the left items display in addition to the Back button.

### Overriding the navigation bar’s appearance settings

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

The appearance settings for a standard-height navigation bar.

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

The appearance settings for a compact-height navigation bar.

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

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

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

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

### Integrating search into your interface

[`searchController`](/documentation/UIKit/UINavigationItem/searchController)

The search controller to integrate into your navigation interface.

[`hidesSearchBarWhenScrolling`](/documentation/UIKit/UINavigationItem/hidesSearchBarWhenScrolling)

A Boolean value that indicates whether the app hides the integrated search bar when scrolling any underlying content.

[`searchBarPlacement`](/documentation/UIKit/UINavigationItem/searchBarPlacement-swift.property)

The placement of the search bar in the navigation bar.

[`preferredSearchBarPlacement`](/documentation/UIKit/UINavigationItem/preferredSearchBarPlacement)

The preferred placement of the search bar in the navigation bar.

[`UINavigationItem.SearchBarPlacement`](/documentation/UIKit/UINavigationItem/SearchBarPlacement-swift.enum)

Constants that determine where the search bar appears in the navigation bar.

[`searchBarPlacementAllowsExternalIntegration`](/documentation/UIKit/UINavigationItem/searchBarPlacementAllowsExternalIntegration)

A Boolean value that indicates whether an alternate object may integrate the search bar somewhere other than the navigation bar or toolbar.

[`searchBarPlacementAllowsToolbarIntegration`](/documentation/UIKit/UINavigationItem/searchBarPlacementAllowsToolbarIntegration)

A Boolean value that indicates whether the system can place the search bar among other toolbar items on iPhone.

[`searchBarPlacementBarButtonItem`](/documentation/UIKit/UINavigationItem/searchBarPlacementBarButtonItem)

An item you use to control the placement of the search bar in a toolbar on iPhone.

### Supporting navigation bar customization

[`customizationIdentifier`](/documentation/UIKit/UINavigationItem/customizationIdentifier)

A globally unique string that enables user customization of the navigation bar layout.

### Working with the overflow menu

[`additionalOverflowItems`](/documentation/UIKit/UINavigationItem/additionalOverflowItems)

Additional items to present in the overflow menu.

[`overflowPresentationSource`](/documentation/UIKit/UINavigationItem/overflowPresentationSource)

The item you can use as an anchor to present a custom UI from the overflow menu button.

### Customizing the title menu

[`titleMenuProvider`](/documentation/UIKit/UINavigationItem/titleMenuProvider)

A closure that generates the navigation item’s title menu.

[`documentProperties`](/documentation/UIKit/UINavigationItem/documentProperties)

An object that provides the document header for the title menu.

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

Information that UIKit uses to generate a document header for a navigation item’s title menu.

### Renaming documents

[`renameDelegate`](/documentation/UIKit/UINavigationItem/renameDelegate-8jiuf)

The delegate for renaming the navigation item.

[`UINavigationItemRenameDelegate`](/documentation/UIKit/UINavigationItemRenameDelegate-5j4ws)

Methods an object implements to rename a navigation item.

### Renaming documents

[`renameDelegate`](/documentation/UIKit/UINavigationItem/renameDelegate-o32h)

The delegate for renaming the navigation item.

[`UINavigationItemRenameDelegate`](/documentation/UIKit/UINavigationItemRenameDelegate-96g5t)

Methods an object implements to rename a navigation item.



---

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)