---
title: content
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nscollectionview/content
---

# content

An array that provides data for the collection view.

## Declaration

```swift
var content: [Any] { get set }
```

## Discussion

Discussion The content object manages the data in the collection view. Use this object to specify an array of items directly. This property is observable using key-value observing. The collection view also exposes a content binding value so that you can specify the array of items using an ArrayController object in Interface Builder. To specify the data for your collection view, assign a value to this property or to the dataSource property, but not both. If you specify a value for the dataSource property, the collection view ignores the value in this property.

## See Also

### Configuring the Collection View

- [delegate](appkit/nscollectionview/delegate.md)
- [NSCollectionViewDelegate](appkit/nscollectionviewdelegate.md)
- [backgroundView](appkit/nscollectionview/backgroundview.md)
- [backgroundColors](appkit/nscollectionview/backgroundcolors.md)
- [backgroundViewScrollsWithContent](appkit/nscollectionview/backgroundviewscrollswithcontent.md)
