Instance Method

setArray(_:)

Sets the receiving array’s elements to those in another given array.

Declaration

func setArray(_ otherArray: [Any])

Parameters

otherArray

The array of objects with which to replace the receiving array’s content.

See Also

Replacing Objects

func replaceObject(at: Int, with: Any)

Replaces the object at index with anObject.

func replaceObjects(at: IndexSet, with: [Any])

Replaces the objects in the receiving array at locations specified with the objects from a given array.

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

Replaces the objects in the receiving array specified by one given range with the objects in another array specified by another range.

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

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