i have a animation with .ontapgesture, and it works fine. so far so good. but I want to call my next view after the animation is finished. but I don't know how. Is there an option to build in a delay while the animation runs?
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()
}
}