How can I change background color of button in SwiftUI?
You can add a modified directly to the button without any containers (ex: Group)
Button(action: {}) {
Text("Click me!")
}
.padding()
.foregroundColor(.white)
.background(Color.red)
Hoping to help someone!
Button(action: { }) {
Text("Button Text!").padding()
}
.background(Color.black)