I don’t think you can set a starting point for CGPathAddEllipseInRect. (At least I was not successful)
: CGPathAddEllipseInRect,
: CGPathAddArc! :
CAKeyframeAnimation *myAnimation = [CAKeyframeAnimation animationWithKeyPath:@"position"];
myAnimation.fillMode = kCAFillModeForwards;
myAnimation.repeatCount = 5;
myAnimation.calculationMode = kCAAnimationPaced;
myAnimation.duration = 10.0;
CGMutablePathRef animationPath = CGPathCreateMutable();
NSInteger startVal = M_PI / 2;
CCGPathAddArc(animationPath, NULL, 100, 100, 100, startVal, startVal + 2*M_PI, NO);
myAnimation.path = animationPath;
CGPathRelease(animationPath);
[view.layer addAnimation:myAnimation forKey:@"changeViewLocation"];
, - . startVal, . ( 2 * M_PI).