Contents

NSCollectionLayoutSection

A container that combines a set of groups into distinct visual groupings.

Declaration

@MainActor class NSCollectionLayoutSection

Overview

A collection view layout has one or more sections. Sections provide a way to separate the layout into distinct pieces.

Each section can have the same layout or a different layout than the other sections in the collection view. A section’s layout is determined by the properties of the group (NSCollectionLayoutGroup) that’s used to create the section.

In the Photos app, each section in the Years page uses the same layout. In the App Store, the Apps page displays several sections with different content arrangements.

[Image]

Each section can have its own background, header, and footer to distinguish it from other sections.

Topics

Creating a section

Specifying scrolling behavior

Configuring section spacing

Configuring additional views

Rendering items

Deprecated

See Also

Components