---
title: editButtonItem
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiviewcontroller/editbuttonitem
---

# editButtonItem

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

## Declaration

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

## Discussion

Discussion If one of the custom views of the navigationItem property is set to the returned object, the associated navigation bar displays an Edit button if isEditing is false and a Done button if isEditing is true. The default button action invokes the setEditing(_:animated:) method.

## See Also

### Adding editing behaviors to your view controller

- [isEditing](uikit/uiviewcontroller/isediting.md)
- [setEditing(_:animated:)](uikit/uiviewcontroller/setediting(_:animated:).md)
