---
title: "add(contentsOf:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsarraycontroller/add(contentsof:)"
---

# add(contentsOf:)

Adds objects to the receiver’s content collection.

## Declaration

```swift
func add(contentsOf objects: [Any])
```

## Discussion

Discussion If selectsInsertedObjects is true (the default), the added objects are selected in the array controller. It is important to note that inserting many objects with selectsInsertedObjects on can cause a significant performance penalty. In this case it is more efficient to use the content method to set the array, or to set selectsInsertedObjects to false before adding the objects with add(contentsOf:).

## See Also

### Adding and Removing Objects

- [addObject(_:)](appkit/nsarraycontroller/addobject(_:).md)
- [insert(_:atArrangedObjectIndex:)](appkit/nsarraycontroller/insert(_:atarrangedobjectindex:).md)
- [insert(contentsOf:atArrangedObjectIndexes:)](appkit/nsarraycontroller/insert(contentsof:atarrangedobjectindexes:).md)
- [remove(atArrangedObjectIndex:)](appkit/nsarraycontroller/remove(atarrangedobjectindex:).md)
- [remove(atArrangedObjectIndexes:)](appkit/nsarraycontroller/remove(atarrangedobjectindexes:).md)
- [remove(_:)](appkit/nsarraycontroller/remove(_:).md)
- [removeObject(_:)](appkit/nsarraycontroller/removeobject(_:).md)
- [remove(contentsOf:)](appkit/nsarraycontroller/remove(contentsof:).md)
