Contents

NSCollectionLayoutVisibleItem

An item that’s currently visible within the bounds of a section.

Declaration

@MainActor protocol NSCollectionLayoutVisibleItem : NSObjectProtocol

Overview

A visible item represents an item in a collection view that’s currently visible onscreen, such as a cell, supplementary view, or decoration. You access a specific section’s visible items in its visible item invalidation handler (NSCollectionLayoutSectionVisibleItemsInvalidationHandler), stored in the visibleItemsInvalidationHandler property. The handler is called before each layout cycle, any time an animation occurs in that section due to changes such as adding or removing items, scrolling the section, or rotating the device.

Topics

Identifying the item

Getting the index path

Configuring appearance

Configuring position

Specifying stacking order

See Also

Layout updates