Monday, June 23, 2014

Multiple Animations

David Rönnqvist:

If there are multiple animations going on at the same time, they are all sent to the render server and all of their changes are applied to the render tree for each frame being rendered. If there are two (or more) animations for the same property, the first will apply its intermediate value and the next will apply its intermediate value on top of that, overwriting the first value. Even animations that are completed but not removed apply their changes to the layers in the render tree, leading to some unnecessary overhead.

Knowing this, our two cases with the order of the implicit and explicit animations can be explained and visualized as follows.

[…]

The best practice is actually to do the same thing as UIView is doing and disable the implicit animation. If we do that, then it doesn’t matter it we update the model before or after.

Comments RSS · Twitter

Leave a Comment