swiftui background color

Swift
Color.blue.edgesIgnoringSafeArea(.all)self.view.backgroundColor = UIColor.blue // or .blue for shorthandGroup {
	//Views inside the highest view in the hierarchy
}.background(Color.red.edgesIgnoringSafeArea(.all))struct ContentView: View {
    var body: some View {
        ZStack {
            Color.red
            .edgesIgnoringSafeArea(.all)
        }
    }
}
Source

Also in Swift: