how to set the stack color in swiftui

Swift
Group {
	//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)
        }
    }
}extension UIStackView {
    func addBackground(color: UIColor) {
        let subView = UIView(frame: bounds)
        subView.backgroundColor = color
        subView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
        insertSubview(subView, at: 0)
    }
}
Source

Also in Swift: