This repository was archived by the owner on Apr 2, 2025. It is now read-only.

Description
HI,
I've been trying for hours to make the animation start, but couldn't. The onChange method, never gets called.
This is the code:
let spring = Spring(initialValue: 0)
spring.onChange = { [weak view] val in
print("change!") // never gets called.
view?.frame.origin.y = val
}
spring.target = 500
I've tried debugging the whole thing and the simulation function never turns into .animating (state). I can't figure this out.
Tried calling both view.setNeedsLayout() and view.setNeedsDisplay().
What am I missing?
Thanks.