I am just getting into the world of SwiftUI, so I don't know if there is a very obvious answer to this question, but basically I have created a button and tried to make the button two concentric circles. However once I run my code on the simulator I found out that I could click literally anywhere on the screen and the button would be "pressed" (I tested it using a print statement). I want to confine the clickable area of the button to the just the area of the circles or maybe the square that bounds both circles.
Here is my code:
Button(action: {
print("Do Something")
}) {
Circle().stroke(Color.white, lineWidth: 3)
.frame(width: 65, height: 65)
.position(x: x, y: y)
.overlay(
Circle().stroke(Color.white, lineWidth: 3)
.frame(width: 55, height: 55)
.position(x: x, y: y)
)
}
This is what it looks like when I click on it in my live preview window:

