import SwiftUI
struct ContentView: View {
@State var currentAmount:CGFloat = 0
@State var finalAmount:CGFloat = 1
var body: some View {
Text("Hello World")
.scaleEffect(finalAmount + currentAmount)
.gesture(
MagnificationGesture().onChanged{ amount in
currentAmount = amount - 1
}.onEnded{ amount in
finalAmount += currentAmount
currentAmount = 0
}
)
}
}

4543




被折叠的 条评论
为什么被折叠?



