Skip to content

Instantly share code, notes, and snippets.

@romyios
Last active July 20, 2022 17:31
Show Gist options
  • Save romyios/8a433831a9a62c6d3b3d6277ba5dea4f to your computer and use it in GitHub Desktop.
Save romyios/8a433831a9a62c6d3b3d6277ba5dea4f to your computer and use it in GitHub Desktop.
swiftui legos
struct ContentView: View {
var body: some View {
ZStack {
Color(uiColor: UIColor.systemGray6)
VStack {
Text("Hello")
List {
Section {
Text("G")
Text("Long item here Long item here Long item here Long item here")
Text("Long item here Long item here Long item here Long item here")
}
Section {
Text("c")
Text("b")
Text("g")
}
}
.listStyle(InsetGroupedListStyle())
.environment(\.horizontalSizeClass, .regular)
}
.padding()
}
}
}

Nice example from stackoverflow

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