I wanted to change background color of the whole screen(including safe area) in SwiftUI.
Adding following code to outermost view works for all the views except if given view contains List
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(Color.red)
I wanted to add background color for the full screen containing List. I have tried multiple things like,
Adding ZStack with first element as Color.red, but not worked
Color.red with List as an overlay, but it still not worked.
Only thing working for me is converting List to ScrollView, but that I don't want.
Do anyone have any other solution to make that work, or Apple doesn't provide anyway to change background color for List?(should support atleast from iOS14 to latest)
