<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITableViewDelegate/tableView(_:willBeginEditingRowAt:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UITableViewDelegate(im)tableView:willBeginEditingRowAtIndexPath:"
  },
  "title" : "tableView(_:willBeginEditingRowAt:)"
}
-->

# tableView(_:willBeginEditingRowAt:)

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

```
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

This method is called when the user swipes horizontally across a row; as a consequence, the table view sets its [`isEditing`](/documentation/UIKit/UITableView/isEditing) property to <doc://com.apple.documentation/documentation/Swift/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:)`](/documentation/UIKit/UITableViewDelegate/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 ``doc://com.apple.uikit/documentation/UIKit/UITableViewDataSource/tableView(_:commit:forRowAt:)`` 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)