Skip to content

Instantly share code, notes, and snippets.

@SergeiMeza
Created January 24, 2021 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SergeiMeza/399424039b246d92aef93468b22b01c0 to your computer and use it in GitHub Desktop.
Save SergeiMeza/399424039b246d92aef93468b22b01c0 to your computer and use it in GitHub Desktop.
import SwiftUI
struct ContentView: View {
var body: some View {
ZStack {
ScrollView {
VStack(alignment: .leading) {
ForEach(1...10, id: \.self) { index in
VStack(alignment: .leading) {
Text("Item \(index)")
.font(.title2)
.fontWeight(.semibold)
Divider()
}
.frame(height:50)
}
}
.padding()
.frame(maxWidth: .infinity)
}
}
.background(
Color
.orange
.edgesIgnoringSafeArea(.all)
)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment