Created
June 20, 2020 19:59
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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