Gestures
新建工程,随意命名,接下来要使用Gestures的点击,长按,拖动,缩放,旋转等功能。
首先,放置一个用于操作手势的物件,比如英语学习单词卡片,代码
ZStack {
Rectangle()
.fill(Color.red)
.frame(width: 320, height: 210, alignment: .center)
.cornerRadius(12)
VStack{
Spacer()
Text("Are you kidding?")
.font(.largeTitle)
.foregroundColor(.white)
Text(