I'm new in SwiftUI
I'm trying to create my section like this, where each row is separated with another. Kinda like section where the background is not connected one another. take a look at the pict: (picture from dribbble)
but mine ended up like this: (I created the bg blue so that y'all can see the rows clearly)
here's my code:
import SwiftUI
struct ProductPageView: View {
init() {
UITableView.appearance().backgroundColor = .clear // Uses UIColor
}
var body: some View {
NavigationView {
ZStack {
Color.blue.edgesIgnoringSafeArea(.all)
VStack {
List {
ForEach(arrayProduct, id: \.name) { dataProduct in
ProductListCell(item: dataProduct)
}
.listRowInsets(EdgeInsets(top: 10, leading: 10, bottom: 10, trailing: 10))
}
.listStyle(InsetGroupedListStyle())
}
}
.navigationTitle("Produk")
}
}
}
I've used listRowInsets but it's just stretch it.
How do I create that separation between rows?
Any help will be appreciated.
Thank you


