Contents

content

An array that provides data for the collection view.

Declaration

var content: [Any] { get set }

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