Parcker
Parcker

Reputation: 219

SwiftUI ListView

I try to build interface with tableview with lists in SwiftUI, but cannot figure out how to make tableview with empty spaces like this:

enter image description here

Upvotes: 2

Views: 149

Answers (1)

Asperi
Asperi

Reputation: 258413

This is a form with sections, like

struct DemoView: View {
    var body: some View {
        Form {
            Section {
                NavigationLink("Upgrade to Premium", destination: Text("Some"))
            }
            Section {
                Button("Rate this app") {}
                Button("Share this app") {}
                Button("Feedback") {}
            }
            Section {
                Button("My other apps") {}
            }
        }
    }
}

Note: assuming it has NavigationView somewhere in parent to make NavigationLink working.

Upvotes: 1

Related Questions