Reputation: 34550
Is there a way to perform an animation in iOS where at every frame I can do some calculations, update constraints and perform a layout (layoutIfNeeded()
)?
The animation I'm trying to achieve seems impossible to do using the standard way of doing a constraint animation, which internally works by calculating just two frames, the first and the last one, so layoutIfNeeded()
is called just twice. In the intermediate frames, view positions are determined by simply interpolating between the first and last frames. I want to recalculate the layout at every frame.
Upvotes: 0
Views: 44
Reputation: 3252
You can always try to use CALayer
animations, depending on your needs.
This is not a direct answer but answer pointing to a place where you can find answer: https://www.objc.io/issues/12-animations/
Upvotes: 1