跳转至
Structure

PlainListStyle

The instance that describes the behavior and appearance of a plain list.

Declaration

struct PlainListStyle : ListStyle

Overview

struct ExampleView: View {
    var body: some View {
        List {
            Text("Bananas 🍌🍌")
            Text("Apples 🍎🍎")
            Text("Peaches 🍑🍑")
        }
        .listStyle(PlainListStyle())
    }
}
A view diplaying a plain list with three items "Bananas 🍌🍌", "Apples 🍎🍎", "Peaches 🍑🍑", which are separated by thin gray lines.

Availability

iOS 13.0+

macOS 10.15+

tvOS 13.0+

watchOS 6.0+

Topics


Initializer

init() Creates a plain list style.