Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CAKeyframeAnimation - move along path and use easing

Is it possible to use CAKeyframeAnimation to move something along a path and at the same time use some sort of easing so there is acceleration or deceleration? I know there is timingFunctions and keyTimes, but I don't see how they would work if you are simply moving along a path.

like image 409
Brian Avatar asked May 02 '11 20:05

Brian


1 Answers

Something like

anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]

?

Or swift 5:

anim.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
like image 92
adam Avatar answered Nov 07 '22 23:11

adam