setObject(_:at:)
Appends or replaces the object at the specified index.
Declaration
func setObject(_ obj: Any, at idx: Int)Parameters
- obj:
The object to insert or append.
- idx:
The index. If the index is equal to the length of the collection, then it inserts the object at that index, otherwise it replaces the object at that index with the given object.