Contents

Section

A container view that you can use to add hierarchy within certain views.

Declaration

struct Section<Parent, Content, Footer>

Mentioned in

Overview

Use Section instances in views like List, Picker, and Form to organize content into separate sections. Each section has custom content that you provide on a per-instance basis. You can also provide headers and footers for each section.

Collapsible sections

Create sections that expand and collapse by using an initializer that accepts an isExpanded binding. A collapsible section in a List that uses the sidebar style shows a disclosure indicator next to the section’s header. Tapping on the disclosure indicator toggles the appearance of the section’s content.

Topics

Creating a section

Adding headers and footers

Controlling collapsibility

Deprecated symbols

See Also

Organizing views into sections