Might be a dumb question and I might have already answered this myself. But, I am trying to put a space between my sections of grids. Currently I am using .padding but this does not seem ideal at all. Or is this really the only way?
var body: some View {
ScrollView(.vertical) {
LazyVGrid(
columns: columns,
alignment: .center,
spacing: 3,
pinnedViews: [.sectionHeaders, .sectionFooters]) {
Section(header:Text("GRID 1").font(.title).bold().padding(.top, 10.0)) {
ForEach(0...9, id: \.self) {
index in Color(UIColor.random)
.frame(minWidth: 0, maxWidth: .infinity, minHeight: 75, maxHeight: .infinity)
}
}
Section(header:Text("GRID 2").font(.title).bold().padding(.top, 50.0)) {
ForEach(10...20, id: \.self) {
index in Color(UIColor.random)
.frame(minWidth: 0, maxWidth: .infinity, minHeight: 75, maxHeight: .infinity)
}
}
}
}
}