tezvyn:

SwiftUI List: More Than Just a Table View

Source: developer.apple.comintermediate

A SwiftUI List is a declarative container for scrollable rows of data, like a modern UITableView. Use it for settings, feeds, or contact lists. The footgun: never nest a List inside a ScrollView, as it breaks scrolling behavior.

A SwiftUI List is a declarative container for scrollable rows of data, like a modern UITableView. You describe what a row looks like, and SwiftUI builds the efficient, platform-adapted list for you. It's ideal for settings screens, feeds, or any master-detail interface. The biggest footgun is nesting a List inside a ScrollView; the List is already scrollable, and nesting them creates unpredictable layout and scrolling conflicts.

Read the original → developer.apple.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

SwiftUI List: More Than Just a Table View · Tezvyn