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 eas开发者_Go百科ing 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.
Something like
anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]
?
Or swift 5:
anim.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
精彩评论