I\'m beginning to try out SwiftUI and I\'m surprised that it doesn\'t seem to be straightforward to change the background color of a View. How do y
SwiftUI
View
Several possibilities : (SwiftUI / Xcode 11)
1 .background(Color.black) //for system colors
.background(Color.black) //for system colors
2 .background(Color("green")) //for colors you created in Assets.xcassets
.background(Color("green")) //for colors you created in Assets.xcassets
Hope it help :)