---
title: "tableView(_:willBeginEditingRowAt:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitableviewdelegate/tableview(_:willbegineditingrowat:)"
---

# tableView(_:willBeginEditingRowAt:)

Tells the delegate that the table view is about to go into editing mode.

## Declaration

```swift
optional func tableView(_ tableView: UITableView, willBeginEditingRowAt indexPath: IndexPath)
```

## Parameters

- `tableView`: The table view providing this information.
- `indexPath`: An index path locating the row in tableView.

## Discussion

Discussion This method is called when the user swipes horizontally across a row; as a consequence, the table view sets its isEditing property to true (thereby entering editing mode) and displays a Delete button in the row identified by indexPath. In this “swipe to delete” mode the table view does not display any insertion, deletion, and reordering controls. This method gives the delegate an opportunity to adjust the application’s user interface to editing mode. When the table exits editing mode (for example, the user taps the Delete button), the table view calls tableView(_:didEndEditingRowAt:). note: A swipe motion across a cell does not cause the display of a Delete button unless the table view’s data source implements the tableView(_:commit:forRowAt:) method.

## See Also

### Editing table rows

- [tableView(_:didEndEditingRowAt:)](uikit/uitableviewdelegate/tableview(_:didendeditingrowat:).md)
- [tableView(_:editingStyleForRowAt:)](uikit/uitableviewdelegate/tableview(_:editingstyleforrowat:).md)
- [tableView(_:titleForDeleteConfirmationButtonForRowAt:)](uikit/uitableviewdelegate/tableview(_:titlefordeleteconfirmationbuttonforrowat:).md)
- [tableView(_:shouldIndentWhileEditingRowAt:)](uikit/uitableviewdelegate/tableview(_:shouldindentwhileeditingrowat:).md)
