moveRow(at:to:)
Moves the specified row to the new row location using animation.
Declaration
func moveRow(at oldIndex: Int, to newIndex: Int)Parameters
- oldIndex:
Initial row index.
- newIndex:
New row index.
Discussion
This is similar to removing a row at oldIndex and inserting it at newIndex, except the same view is used and simply has its position updated to the new location.
Changes happen incrementally as they are sent to the table, so as soon as this method is called the row can be considered moved. However the underlying view is not moved until endUpdates() has been called.
This method can be called multiple times within the same beginUpdates() and endUpdates() block.