I would like to understand why am I having issue with the background()
?
Instance method 'background(_:alignment:)' requires that 'UIColor' conform to 'View'
var body: some View {
Button("MY BUTTON") {
print("the action")
}
.padding()
.background(Color.black)
.foregroundColor(.white)
.clipShape(Capsule())
}
UPDATE
Get same thing with this:
Thanks