【发布时间】:2020-12-16 17:10:27
【问题描述】:
我有一个带有 .ontapgesture 的动画,效果很好。到目前为止,一切都很好。 但我想在动画完成后调用我的下一个视图。但我不知道怎么做。是否可以选择在动画运行时构建延迟?
var body: some View {
Text("test")
.scaleEffect(x: isButtonPressed ? 1.5 : 1, y: isButtonPressed ? 1.5 : 1)
.animation(Animation.linear.repeatCount(5))
.onTapGesture {
isButtonPressed.toggle()
jumpToNextView.toggle()
}
}
【问题讨论】:
-
嗨拉贾,非常感谢。我会看看这个网站!