Avatar ·

How to change background color of SwiftUI View? (Background Color)

Hi everyone! I just started learning SwiftUI and can't figure out how to change the background. In UIKit I was used to just doing `view.backgroundColor = .red`, but in SwiftUI it seems to be different. I tried writing this: ```swift struct ContentView: View { var body: some View { Text("Hello, world!") .background(Color.red) } } ``` The background changes, but only for the text itself, not the entire screen. How can I make the background fill the entire View area, including the Safe Area? I also tried applying `.background()` to the entire `NavigationView`: ```swift struct ContentView: View { var body: some View { NavigationView { VStack { Text("Title") Text("Content") } } .background(Color ```