Contents

replaceObjects(in:withObjectsFrom:)

Replaces the objects in the receiving array specified by a given range with all of the objects from a given array.

Declaration

func replaceObjects(in range: NSRange, withObjectsFrom otherArray: [Any])

Parameters

  • range:

    The range of objects to be replaced in (or removed from) the receiving array.

  • otherArray:

    The array of objects from which to select replacements for the objects in aRange.

Discussion

If otherArray has fewer objects than are specified by aRange, the extra objects in the receiving array are removed. If otherArray has more objects than are specified by aRange, the extra objects from otherArray are inserted into the receiving array.

See Also

Related Documentation

Replacing Objects