我有一个图层将从 UIBezierPath 上的 A 点移动到 B 点。
我发现了很多涉及 CAAnimation 和 UIBezierPath 的示例。
但我只需将图层从指定点移动到贝塞尔曲线路径上的另一个点。
任何建议,将不胜感激。
Thanks
希望这会有所帮助。
UIBezierPath *trackPath = [UIBezierPath bezierPath];
.
.
.
CAKeyframeAnimation *anim = [CAKeyframeAnimation animationWithKeyPath:@"position"];
anim.path = trackPath.CGPath;
anim.repeatCount = 1;
anim.duration = 2.0;
[layerToAnimate addAnimation:anim forKey:@"pathGuide"];
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)