Skip to content

Instantly share code, notes, and snippets.

@christianselig
Created September 22, 2022 17:46
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 christianselig/de1310f7a229758c923e0eda7e27bc3f to your computer and use it in GitHub Desktop.
Save christianselig/de1310f7a229758c923e0eda7e27bc3f to your computer and use it in GitHub Desktop.
struct ContentView: View {
var body: some View {
List {
Section {
VStack(alignment: .leading, spacing: 20.0) {
Image("example") // Natively 1179x787
.resizable()
.scaledToFill()
VStack(alignment: .leading, spacing: 20.0) {
ForEach(1 ... 4, id: \.self) { index in
Text("This is a long sentence that goes on and on and is not at all brief and should probably stop soon")
}
}
.padding()
}
}
.listRowInsets(EdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 0))
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .leading)
}
}
}
@christianselig
Copy link
Author

Link to image if it helps: https://i.imgur.com/n9hgW9d.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment