Skip to content

Instantly share code, notes, and snippets.

@dheerajn
Created September 28, 2021 02:21
Show Gist options
  • Save dheerajn/9d19bf6af2b32f89448717145b3b1375 to your computer and use it in GitHub Desktop.
Save dheerajn/9d19bf6af2b32f89448717145b3b1375 to your computer and use it in GitHub Desktop.
struct BackgroundColorChange: View {
let gridItems = [GridItem(.flexible()), GridItem(.flexible(minimum: 20, maximum: 50)), GridItem(.flexible()), GridItem(.flexible()), GridItem(.flexible(minimum: 10, maximum: 20))]
var body: some View {
ScrollView {
LazyVGrid(columns: gridItems, spacing: 0) {
ForEach(0...100, id: \.self) {
Text("\($0)")
.padding()
.debugOnlyBackground()
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment