0Pricing
SwiftUI Academy · Lesson

Sections & List Styles

Group rows with sections and pick a list style.

Grouping with Sections

A long list reads better when split into chunks. Section groups related rows under a shared heading. 🗂️

List {
    Section("Fruits") {
        Text("Apple")
    }
}

Headers and Footers

A Section can show a header above its rows and a footer below, great for titles and helper text.

Section {
    Text("Wi-Fi")
} header: {
    Text("Network")
} footer: {
    Text("Tap to connect")
}

All lessons in this course

  1. Building a Static List
  2. Looping with ForEach
  3. Identifiable & Stable IDs
  4. Sections & List Styles
← Back to SwiftUI Academy