Ios 在圆形路径上移动视图

Ios 在圆形路径上移动视图,ios,objective-c,animation,uibezierpath,Ios,Objective C,Animation,Uibezierpath,我正在尝试使用UIBezierPath在圆形路径上移动UIImageView,我的代码正常工作。但我的问题是动画的起点。imageView从距离路径0的角度开始设置动画。 如何更改动画起点 CGMutablePathRef path = CGPathCreateMutable(); CGPathAddRect(path, NULL, CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)); CAKeyframeAnim

我正在尝试使用
UIBezierPath
在圆形路径上移动
UIImageView
,我的代码正常工作。但我的问题是动画的起点。imageView从距离路径0的角度开始设置动画。
如何更改动画起点

 CGMutablePathRef path = CGPathCreateMutable();
CGPathAddRect(path, NULL, CGRectMake(0, 0, self.frame.size.width, self.frame.size.height));

CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"position"];
animation.duration = FACE_DETECTED_TIME;
animation.timingFunction = [CAMediaTimingFunction functionWithName:@"easeInEaseOut"];
animation.repeatCount = 1;
//    animation.path = path;

UIBezierPath *bezierPath= [UIBezierPath bezierPathWithOvalInRect:self.faceBorderImageView.frame];

animation.path = bezierPath.CGPath ;
 [self.tickImageView.layer addAnimation:animation forKey:@"test" ];

使用圆弧代替圆

-(UIBezierPath *)createArcWithRadius:(CGFloat)radius withStartAngle:(CGFloat)startAngle endAngle:(CGFloat)endAngle {

    UIBezierPath *path=[UIBezierPath bezierPathWithArcCenter:CGPointMake(radius, radius) radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES];

    return path;
}

你能给我举个例子吗?