Skip to content

Instantly share code, notes, and snippets.

@PetreVane
Created June 20, 2020 19:59
Show Gist options
  • Save PetreVane/c538e2c03f3a01a78137434c5bd0799d to your computer and use it in GitHub Desktop.
Save PetreVane/c538e2c03f3a01a78137434c5bd0799d to your computer and use it in GitHub Desktop.
This is an example of a List (UITableView) with a section Header and Footer and GroupedStyle
import SwiftUI
struct ContentView: View {
var body: some View {
List {
Section(header: Text("This is a Header"), footer: Text("This is a footer")) {
ForEach(0 ..< 5) {
Text("\($0)").tag($0)
}
}
}
.listStyle(GroupedListStyle())
.cornerRadius(15)
.padding()
.foregroundColor(.green)
.shadow(radius: 35)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment