Skip to content

Instantly share code, notes, and snippets.

@mluton
Last active September 16, 2020 03:44
Show Gist options
  • Save mluton/23f1f5c4cee599307107faa3c7b0c074 to your computer and use it in GitHub Desktop.
Save mluton/23f1f5c4cee599307107faa3c7b0c074 to your computer and use it in GitHub Desktop.
SwiftUI: Evenly Space Items in VStack
struct ContentView: View {
var body: some View {
VStack(alignment: .leading) {
Text("Dark Side of the Moon")
.frame(maxHeight: .infinity)
Text("Wish You Were Here")
.frame(maxHeight: .infinity)
Text("Animals")
.frame(maxHeight: .infinity)
Text("The Wall")
.frame(maxHeight: .infinity)
Text("The Final Cut")
.frame(maxHeight: .infinity)
Text("A Momentary Lapse of Reason")
.frame(maxHeight: .infinity)
Text("The Division Bell")
.frame(maxHeight: .infinity)
Text("The Endless River")
.frame(maxHeight: .infinity)
}
.frame(maxHeight: .infinity)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment