What I'm trying to achieve is the ability to animate and position an image along a path at a specific location along the path. The percentage along the way will be good.
What I want to achieve:


What happens when I install an animation, it animates all the way, back to the starting point. I need to know how to specify a breakpoint anywhere in the way.
Below is a snippet:
imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"EMOTICON_0.png"]]; [view addSubview:imageView]; CAKeyframeAnimation *positionAnimation = [CAKeyframeAnimation animationWithKeyPath:@"position"]; positionAnimation.path = [view path].CGPath; positionAnimation.rotationMode = kCAAnimationRotateAuto; positionAnimation.removedOnCompletion = NO; positionAnimation.fillMode = kCAFillModeForwards; positionAnimation.duration = 5.0; positionAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; [imageView.layer addAnimation:positionAnimation forKey:positionAnimation.keyPath];
source share