Home > AI > IOS > SwiftUI >

InsetGroupedListStyle

Example: let the section has the rounded corner effect

struct ContentView: View {
   
    var body: some View {
        List {
            Section {
                Text("Item 1")
                Text("Item 2")
                Text("Item 3")
            }

            Section {
                Text("Item 4")
                Text("Item 5")
                Text("Item 6")
            }
        }
        .listStyle(InsetGroupedListStyle())
    }
}

Leave a Reply