<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIViewController/editButtonItem",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIViewController(py)editButtonItem"
  },
  "title" : "editButtonItem"
}
-->

# editButtonItem

Returns a bar button item that toggles its title and associated state between Edit and Done.

```
var editButtonItem: UIBarButtonItem { get }
```

## Discussion

If one of the custom views of the [`navigationItem`](/documentation/UIKit/UIViewController/navigationItem) property is set to the returned object, the associated navigation bar displays an Edit button if [`isEditing`](/documentation/UIKit/UIViewController/isEditing) is <doc://com.apple.documentation/documentation/Swift/false> and a Done button if [`isEditing`](/documentation/UIKit/UIViewController/isEditing) is <doc://com.apple.documentation/documentation/Swift/true>. The default button action invokes the [`setEditing(_:animated:)`](/documentation/UIKit/UIViewController/setEditing(_:animated:)) method.

---

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)