Contents

NSCollectionLayoutDecorationItem

An object used to add a background to a section of a collection view.

Declaration

@MainActor class NSCollectionLayoutDecorationItem

Overview

Each type of decoration item must have a unique element kind. Consider tracking these strings together in a way that makes it straightforward to identify each element, for example:

Add a background to a section by setting that section’s decorationItems property:

Topics

Creating a background

Getting the element kind

Specifying stacking order

See Also

Appearance