NSCollectionLayoutSupplementaryItem
An object used to add an extra visual decoration to an item in a collection view.
Declaration
@MainActor class NSCollectionLayoutSupplementaryItemOverview
You use supplementary items to attach additional views to your content. For example, you might attach a badge to an item or a frame around a group. A supplementary item follows the index path of the item it’s attached to.
If you want to create a header or footer for your layout or its sections, use a boundary supplementary item (NSCollectionLayoutBoundarySupplementaryItem) instead.
Each type of supplementary 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 supplementary items to an item by passing in an array of supplementary items when you construct the item:
Topics
Creating a supplementary item
init(layoutSize:elementKind:containerAnchor:)init(layoutSize:elementKind:containerAnchor:itemAnchor:)