Contents

tableView(_:moveRowAt:to:)

Tells the data source to move a row at a specific location in the table view to another location.

Declaration

optional func tableView(_ tableView: UITableView, moveRowAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath)

Parameters

  • tableView:

    The table-view object requesting this action.

  • sourceIndexPath:

    An index path locating the row to be moved in tableView.

  • destinationIndexPath:

    An index path locating the row in tableView that’s the destination of the move.

Discussion

The UITableView object sends this message to the data source when the user presses the reorder control in the row at sourceIndexPath.

See Also

Related Documentation

Reordering table rows