开发者

CAKeyframeAnimation - move along path and use easing

开发者 https://www.devze.com 2023-03-02 14:15 出处:网络
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 timingFuncti

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)
0

精彩评论

暂无评论...
验证码 换一张
取 消