如何沿路径动画UIImageView?
有没有人知道任何介绍这个的教程?
答案 0 :(得分:0)
CAKeyframeAnimation可以这样做。
CGMutablePathRef path = CGPathCreateMutable();
//your code to configure the path
//configure the animation
CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"position"];
[animation setPath:path];
[animation setDuration:3.0];
CGPathRelease(path);
[self.yourImageView.layer addAnimation:animation forKey:NULL];