Color.blue.edgesIgnoringSafeArea(.all)
self.view.backgroundColor = UIColor.red
var body: some View {
ZStack {
Color.purple
.ignoresSafeArea()
// Your other content here
// Other layers will respect the safe area edges
}
}
Group {
//Views inside the highest view in the hierarchy
}.background(Color.red.edgesIgnoringSafeArea(.all))
self.view.backgroundColor = UIColor.blue // or .blue for shorthand
self.view.backgroundColor = .black / .blue / .purple / .clear /ect.