swiftui button background color code example
Example 1: button color swiftui
Button(action: {self.buttonTapped()}) {
Text("Button")
.padding(.all, 12)
.foregroundColor(.white)
.background(Color.red)
}
Example 2: swiftui background color
Group {
//Views inside the highest view in the hierarchy
}.background(Color.red.edgesIgnoringSafeArea(.all))