moveObjects(at:to:)
Moves the objects at the specified indexes to the new location.
Declaration
func moveObjects(at indexes: IndexSet, to idx: Int)Parameters
- indexes:
The indexes of the objects to move.
- idx:
The index in the mutable ordered set at which to insert the objects. The objects being moved are first removed from the set, then this index is used to find the location at which to insert the moved objects.
Discussion
For example, the following code results in the contents of mySet being equal to ["a", "c", "b", "d", "e"]: