<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UINavigationItemRenameDelegate-5j4ws/navigationItem(_:shouldEndRenamingWith:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:5UIKit30UINavigationItemRenameDelegateP010navigationC0_21shouldEndRenamingWithSbSo0bC0C_SStF"
  },
  "title" : "navigationItem(_:shouldEndRenamingWith:)"
}
-->

# navigationItem(_:shouldEndRenamingWith:)

Asks the delegate whether to continue or abandon the rename process.

```
@MainActor @preconcurrency func navigationItem(_: UINavigationItem, shouldEndRenamingWith title: String) -> Bool
```

## Parameters

`_`

The navigation item attempting to continue the rename process.

`title`

The new title of the navigation item.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> to continue the rename process; <doc://com.apple.documentation/documentation/Swift/false> to cancel the rename process.

## Discussion

Implement this method to return <doc://com.apple.documentation/documentation/Swift/false> to prevent renaming.

> Important:
> UIKit might not call this method in certain situations, like when the system pushes a new navigation item onto the navigation bar. In these situations, UIKit calls ``doc://com.apple.uikit/documentation/UIKit/UINavigationItemRenameDelegate-5j4ws/navigationItem(_:didEndRenamingWith:)`` instead. Therefore, make sure to implement ``doc://com.apple.uikit/documentation/UIKit/UINavigationItemRenameDelegate-5j4ws/navigationItem(_:didEndRenamingWith:)`` to handle the cases when ``doc://com.apple.uikit/documentation/UIKit/UINavigationItemRenameDelegate-5j4ws/navigationItem(_:shouldEndRenamingWith:)`` returns <doc://com.apple.documentation/documentation/Swift/false>.

---

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)