With the new XCode 13 and it‘s iOS 15 support the presentation of Lists have apparently changed. Now a List has an additional gray background. Before, the background was plain white, just as I would like it to be. When I add other elements like texts, the default background color is still white.
Is there any way to get rid of the gray surrounding of the List without switching to a ForEach()
solution?
I tried changing the background color from gray to white on various places and adding additional stacks in hope to override the default background color.
This I want be be all white without the gray surrounding:
struct ContentView: View {
var body: some View {
VStack {
Text("Test")
List {
ForEach(1..<20) { i in
Text(String(i))
}
}.frame(maxWidth: .infinity)
}
}
}