-2

How do I animate UIImageView along a path?

Does anyone know of any tutorials that walk through this?

rmaddy
  • 314,917
  • 42
  • 532
  • 579

1 Answers1

0

CAKayframeAnimation can do so.

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];
Jing
  • 536
  • 3
  • 12