<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UINavigationBarDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UINavigationBarDelegate"
  },
  "title" : "UINavigationBarDelegate"
}
-->

# UINavigationBarDelegate

Methods that a navigation bar calls before and after it modifies its stack of navigation items.

```
@MainActor protocol UINavigationBarDelegate : UIBarPositioningDelegate
```

## Overview

The [`UINavigationBarDelegate`](/documentation/UIKit/UINavigationBarDelegate) protocol defines optional methods that a [`UINavigationBar`](/documentation/UIKit/UINavigationBar) [`delegate`](/documentation/UIKit/UINavigationBar/delegate) implements to update its views when items push or pop from the stack. The navigation bar represents only the bar at the top of the screen, not the view below. It’s the application’s responsibility to implement the behavior when the top item changes.

You can control whether a navigation bar pushes an item on or pops an item from the stack by implementing the [`navigationBar(_:shouldPush:)`](/documentation/UIKit/UINavigationBarDelegate/navigationBar(_:shouldPush:)) and [`navigationBar(_:shouldPop:)`](/documentation/UIKit/UINavigationBarDelegate/navigationBar(_:shouldPop:)) methods. These methods return <doc://com.apple.documentation/documentation/Swift/true> if the action is allowed; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

The screen always reflects the top item on the navigation bar. You implement the [`navigationBar(_:didPush:)`](/documentation/UIKit/UINavigationBarDelegate/navigationBar(_:didPush:)) method to update the view below the navigation bar to reflect the new item. Similarly, you implement the [`navigationBar(_:didPop:)`](/documentation/UIKit/UINavigationBarDelegate/navigationBar(_:didPop:)) method to replace the view below the navigation bar.

## Topics

### Pushing items

[`-  navigationBar:shouldPushItem:`](/documentation/UIKit/UINavigationBarDelegate/navigationBar(_:shouldPush:))

Returns a Boolean value indicating whether the navigation bar should push an item.

[`-  navigationBar:didPushItem:`](/documentation/UIKit/UINavigationBarDelegate/navigationBar(_:didPush:))

Tells the delegate that an item was pushed onto the navigation bar.

### Popping items

[`-  navigationBar:shouldPopItem:`](/documentation/UIKit/UINavigationBarDelegate/navigationBar(_:shouldPop:))

Returns a Boolean value indicating whether the navigation bar should pop an item.

[`-  navigationBar:didPopItem:`](/documentation/UIKit/UINavigationBarDelegate/navigationBar(_:didPop:))

Tells the delegate that an item was popped from the navigation bar.

### Building with Mac Catalyst

[`-  navigationBarNSToolbarSection:`](/documentation/UIKit/UINavigationBarDelegate/navigationBarNSToolbarSection(_:))

Asks the delegate which section of the toolbar to host the navigation bar in.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

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

---

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)