Instance Method


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


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



The table-view object providing this information.


An index path locating the row in tableView.


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:).

See Also

Editing Table Rows

func tableView(UITableView, didEndEditingRowAt: IndexPath?)

Tells the delegate that the table view has left editing mode.

func tableView(UITableView, editingStyleForRowAt: IndexPath) -> UITableViewCell.EditingStyle

Asks the delegate for the editing style of a row at a particular location in a table view.

func tableView(UITableView, shouldIndentWhileEditingRowAt: IndexPath) -> Bool

Asks the delegate whether the background of the specified row should be indented while the table view is in editing mode.