Instance Method

tableView(_:didEndEditingRowAt:)

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

Declaration

optional func tableView(_ tableView: UITableView, didEndEditingRowAt indexPath: IndexPath?)

Parameters

tableView

The table-view object providing this information.

indexPath

An index path locating the row in tableView.

Discussion

This method is called when the table view exits editing mode after having been put into the mode by the user swiping across the row identified by indexPath. As a result, a Delete button appears in the row; however, in this "€œswipe to delete"€ mode the table view does not display any insertion, deletion, and reordering controls. When entering this "€œswipe to delete"€ editing mode, the table view sends a tableView(_:willBeginEditingRowAt:) message to the delegate to allow it to adjust its user interface.

See Also

Editing Table Rows

func tableView(UITableView, willBeginEditingRowAt: IndexPath)

Tells the delegate that the table view is about to go into 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.