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:
CAAnimationGroup
and add the different CABasicAnimation
objects to it. By controlling their beginTime
property and setting different CAMediaTimingFunction
on them I get the individual behavior I want.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
To me, the choice between the two is a semantic one: