replaceObjects(at:with:)
Replaces the objects in the receiving array at locations specified with the objects from a given array.
Declaration
func replaceObjects(at indexes: IndexSet, with objects: [Any])Parameters
- indexes:
The indexes of the objects to be replaced.
- objects:
The objects with which to replace the objects in the receiving array at the indexes specified by
indexes. The count of locations inindexesmust equal the count ofobjects.
Discussion
The indexes in indexes are used in the same order as the objects in objects.
If objects or indexes is nil, this method raises an exception.