---
title: "delete(displayed:options:actionHandler:)"
framework: uikit
role: symbol
role_heading: Type Method
path: "uikit/uicellaccessory-swift.struct/delete(displayed:options:actionhandler:)"
---

# delete(displayed:options:actionHandler:)

Creates a delete system accessory with the specified display state, configuration options, and optional action handler.

## Declaration

```swift
static func delete(displayed: UICellAccessory.DisplayedState = .whenEditing, options: UICellAccessory.DeleteOptions = DeleteOptions(), actionHandler: UICellAccessory.ActionHandler? = nil) -> UICellAccessory
```

## Parameters

- `displayed`: The cell-editing states that the delete accessory appears in. This parameter has a default value of doc://com.apple.uikit/documentation/UIKit/UICellAccessory-swift.struct/DisplayedState/whenEditing.
- `options`: Configuration options for the delete accessory. See doc://com.apple.uikit/documentation/UIKit/UICellAccessory-swift.struct/DeleteOptions for possible configuration options.
- `actionHandler`: An optional closure that the system calls when a user interacts with the delete accessory.

## Return Value

Return Value A configured delete cell accessory. This accessory is a minus sign inside of a circle with the default system red color. This accessory appears on the leading edge of the cell.

## See Also

### Creating a delete accessory

- [UICellAccessory.DeleteOptions](uikit/uicellaccessory-swift.struct/deleteoptions.md)
