xxxxxxxxxx
Group {
//Views inside the highest view in the hierarchy
}.background(Color.red.edgesIgnoringSafeArea(.all))
xxxxxxxxxx
var body: some View {
ZStack {
Color.purple
.ignoresSafeArea()
// Your other content here
// Other layers will respect the safe area edges
}
}
xxxxxxxxxx
let view = UIView(frame: CGRect(x: 0, y: 0, width: 200, height: 200))
view.backgroundColor = UIColor.red