0Pricing
SwiftUI Academy · Lesson

Building a Static List

Create a scrolling list of rows.

Building a Static List is a free SwiftUI Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the SwiftUI Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Meet List

A List is SwiftUI's go-to container for showing rows of content in a clean, scrolling column. 📜

List {
    Text("First row")
    Text("Second row")
}

Rows Are Just Views

Anything you put inside a List becomes a row. A plain Text, an Image, or a whole stack each get their own tidy row.

List {
    Text("Apples")
    Image(systemName: "star")
}

It Scrolls for Free

You never wire up scrolling yourself. A List automatically scrolls when its rows overflow the screen.

Built-in Styling

Each row arrives with system separators, inset padding, and tap highlighting, so your list looks native instantly.

Rich Rows

Put an HStack inside a row to mix an icon and a label side by side, just like settings screens do.

List {
    HStack {
        Image(systemName: "wifi")
        Text("Network")
    }
}

Multiple Lines per Row

A VStack inside a row stacks a title over a subtitle, giving each row two clear lines of detail like a contacts entry.

List {
    VStack(alignment: .leading) {
        Text("Title")
        Text("Subtitle")
    }
}

List vs ScrollView

Reach for a List when you want row styling and separators; use a ScrollView for free-form, custom layouts.

Mixing Row Types

A static List can hold totally different rows, like a header Text followed by an HStack control. Each line stands on its own.

List {
    Text("Settings")
    Toggle("Wi-Fi", isOn: .constant(true))
}

Plenty of Rows

Add as many rows as you like and the List stays smooth, only rendering what is currently on screen.

Tap Feedback

Rows highlight on touch automatically, so a List feels interactive even before you add any tap actions.

Where Lists Shine

Settings, menus, and inboxes are all List at heart. It is the backbone of most iOS screens you use daily. ✨

Quick Check

Think about how rows are created.

Recap

You met List: a scrolling container where each view inside becomes a styled, tappable row, perfect for menus and settings. 🎉

Frequently asked questions

Is the “Building a Static List” lesson free?

Yes — the full text of “Building a Static List” is free to read here on the web, and the SwiftUI Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the SwiftUI Academy course, upgrade to CoddyKit PRO.

What will I learn in “Building a Static List”?

Create a scrolling list of rows. You practise SwiftUI Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start SwiftUI Academy?

No prior experience is required. SwiftUI Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Building a Static List” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this SwiftUI Academy lesson?

Yes. Every SwiftUI Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

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