Tells the data source to move a row at a specific location in the table view to another location.
SDKs
- iOS 2.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- UIKit
Declaration
optional func tableView(_ tableView: UITable View, moveRowAt sourceIndexPath: Index Path, to destinationIndexPath: Index Path)
Parameters
tableView
The table-view object requesting this action.
fromIndexPath
An index path locating the row to be moved in
table
.View toIndexPath
An index path locating the row in
table
that is the destination of the move.View
Discussion
The UITable
object sends this message to the data source when the user presses the reorder control in from
.