A layout object that lets you combine items in highly adaptive and flexible visual arrangements.
- iOS 13.0+
- Mac Catalyst 13.0+
- tvOS 13.0+
A compositional layout is a type of collection view layout. It's designed to be composable, flexible, and fast, letting you build any kind of visual arrangement for your content by combining—or compositing—each smaller component into a full layout.
A compositional layout is composed of one or more sections that break up the layout into distinct visual groupings. Each section is composed of groups of individual items, the smallest unit of data you want to present. A group might lay out its items in a horizontal row, a vertical column, or a custom arrangement.
You combine the components by building up from items into a group, from groups into a section, and finally into a full layout, like in this example of a basic list layout: