how to do a simple scaling animation and why isn’t this working?

Here is possible approach (based on AnimatableModifier). Actually it demonstrates how current animation end can be detected, and performed something – in this case, for your scaling scenario, just initiate reversing. Simplified & modified your example struct TestReversingScaleAnimation: View { @State var scaleImage : CGFloat = 1 var body: some View { VStack { Button(“Start … Read more

css3 animation on :hover; force entire animation

I’m afraid that the only way to solve this is with a bit of javascript, you must add the animation as a class and then remove it when the animation finishes. $(“.box”).bind(“webkitAnimationEnd mozAnimationEnd animationend”, function(){ $(this).removeClass(“animated”) }) $(“.box”).hover(function(){ $(this).addClass(“animated”); }) http://jsfiddle.net/u7vXT/