Instance Property

backgroundColors

An array containing the collection view’s background colors.

Declaration

@property(copy) NSArray<NSColor *> *backgroundColors;

Discussion

This property contains an array of NSColor objects, representing the colors to use when drawing the background grid. Specifying an empty array or nil causes the collection view to use the default colors returned by the controlAlternatingRowBackgroundColors method.

When a background view is specified for the collection view, the colors in this property are ignored.

See Also

Configuring the Collection View

delegate

The collection view’s delegate object.

NSCollectionViewDelegate

A set of methods that you use to manage the behavior of a collection view.

content

An array that provides data for the collection view.

backgroundView

The background view placed behind all items and supplementary views.

backgroundViewScrollsWithContent

A Boolean value that indicates whether the collection view’s background view scrolls with the items and other content.