Hi everyone, do you know the command to change the position of a shape. I want to change the position of a Rectangle and draw it to the right, this was the code that I tried: But it shows me that blue frame around and when I click on it (since it is a button) I can’t click outside that frame. Please help me…
Thank you in advance ;)
I tested this that seems to give the result you expect:
Button {
} label: {
Rectangle()
.frame(width: 180, height: 80)
.foregroundColor(Color(.systemBlue))
.opacity(0.5)
.cornerRadius(60)
// .position(x: 90, y: 44)
}
.frame(width: 180, height: 80)
.position(x: 90, y: 44)
However, clicking on label: {
does not give the right frame…
Thanks to tell if there is still a problem (then please explain precisely what you'd expect and what you get) ; don't forget to close the thread if that works.