Contents

Lists

Display a structured, scrollable column of information.

Overview

Use a list to display a one-dimensional vertical collection of views.

[Image]

The list is a complex container type that automatically provides scrolling when it grows too large for the current display. You build a list by providing it with individual views for the rows in the list, or by using a ForEach to enumerate a group of rows. You can also mix these strategies, blending any number of individual views and ForEach constructs.

Use view modifiers to configure the appearance and behavior of a list and its rows, headers, sections, and separators. For example, you can apply a style to the list, add swipe gestures to individual rows, or make the list refreshable with a pull-down gesture. You can also use the configuration associated with Scroll views to control the list’s implicit scrolling behavior.

For design guidance, see Lists and tables in the Human Interface Guidelines.

Topics

Creating a list

Disclosing information progressively

Configuring a list’s layout

Configuring rows

Configuring headers

Configuring separators

Configuring backgrounds

Displaying a badge on a list item

Configuring interaction

Refreshing a list’s content

Editing a list

Configuring a section index

See Also

View layout