Dear fellow Stackers,
I'm currently working on some core animation stuff for the iOS and really enjoying myself. This question is regarding the many different ways one can implement an animation. Say you would like to rotate a UIView a few times but with different timing functions for each animation cycle. To the best of my knowledge there are at least two different way of implementing this:
- I either create a
CAAnimationGroup
and add the differentCABasicAnimation
objects to it. By controlling theirbeginTime
property and setting differentCAMediaTimingFunction
on them I get the individual behavior I want. - The other option is to create a
CAKeyframeAnimation
and by adding different key values I can customize the different "frames" individually.
So my question is this: Is there any advantage of using either one of these implementations?
My follow up question: If so, what method do you use for finding this out? In other words, how would I go about measuring the performance of an animation?
Thank you in advance and best regards.
//Abeansits