跳转至
Structure

GroupedListStyle

A standard grouped list style.

Declaration

struct GroupedListStyle : ListStyle

Overview

struct ExampleView: View {
    var body: some View {
        List {
            Text("Bananas 🍌🍌")
            Text("Apples 🍎🍎")
            Text("Peaches 🍑🍑")
        }
        .listStyle(GroupedListStyle())
    }
}
A view containing a grouped list with three text views, "Bananas 🍌🍌", "Apples 🍎🍎", and "Peaches 🍑🍑".

Availability

iOS 13.0+

tvOS 13.0+

Topics


Initializer

init() Creates a grouped list style.