跳转至
Structure

DefaultListStyle

The instance that describes a platform's default behavior and appearance for a list.

Declaration

struct DefaultListStyle : ListStyle

Overview

struct ExampleView: View {
    var body: some View {
        List {
            Text("Bananas 🍌🍌")
            Text("Apples 🍎🍎")
            Text("Peaches 🍑🍑")
        }
        .listStyle(DefaultListStyle())
    }
}
A white view containing a list with three text items.

Availability

iOS 13.0+

macOS 10.15+

tvOS 13.0+

watchOS 6.0+

Topics


Initializer

init() Creates a default list style.