I would like to create a button with a rounded rectangle view with a border, and a background color.
I wrote this so far :
Button(action: {
}, label: {
Text("TAP ME")
.foregroundColor(Color.blue)
})
.frame(height: 50)
.frame(maxWidth: .infinity)
.overlay(
RoundedRectangle(cornerRadius: 50, style: .continuous)
.strokeBorder(Color.blue, lineWidth: 1)
)
I tried to add .background(Color.red) at many different places, but here is what I get everytime:
What to do here?
Thank you for your help

