I want a UIView to move from where it is before the animation, along an elliptical path, back to the starting point. In reality, the view jumps to another point, circles back to that point, then jumps back to where it was when the view controller's view appeared.
Here is the code that makes the animation happen:
Here is the code that makes the animation happen:
Code:
CGPathRef animationPath = CGPathCreateWithEllipseInRect([[self view] frame], nil);
CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"position"];
animation.path = animationPath;
animation.speed = 0.1;
[[[self racecarImageView] layer] addAnimation:animation forKey:@"position"];
Last edited: