Hello there! I would like to move the object according to the button press. In this code, I have the circle and I like to move it down if I press the down button. Can anyone tell me how can I do this?
Thanks.
import SwiftUI
import PlaygroundSupport
struct ContentView: View {
var body: some View {
Circle()
.frame(width: 80, height: 80)
Spacer(minLength: 20)
Button{
} label: {
Image(systemName: "arrowtriangle.down.circle.fill")
.resizable()
.foregroundColor(.blue)
.frame(width: 70, height: 70)
.padding()
}
}
}
PlaygroundPage.current.setLiveView(ContentView())