I am currently working with Lists
in SwiftUI
.
Problem: A default View in SwiftUI has a white background Color
. However, when adding a List to it, the Background Color changes to systemGray6
while the List Cells take the white bgColor
.
Goal: I would like to have a List with white
bgColor and Cells with systemGray6
bgcolor.
I accomplished to change the Background Color of the List Rows :
List(users) { user in
// ...
}
.listRowBackground(Color(UIColor.systemGray6)
However, I can't find a solution for changing the Screen's bgColor back to
white
. I tried the obvious stuff like.background(Color.white)
.
Does anyone has a solution for this issue?
Thanks for your help.