Ios 曲线动画旋转方向?

Ios 曲线动画旋转方向?,ios,animation,calayer,cakeyframeanimation,Ios,Animation,Calayer,Cakeyframeanimation,在我的应用程序中,我使用以下动画使我的UIElement沿着顺时针方向的圆路径 CGMutablePathRef path = CGPathCreateMutable(); CGPathAddArc(path, NULL,viewFormsUI.center.x,viewFormsUI.center.y, 88,radianOf(243),radianOf(0), YES); //viewFormsUI is an UIView CAKeyfram

在我的应用程序中,我使用以下动画使我的UIElement沿着顺时针方向的圆路径

CGMutablePathRef path = CGPathCreateMutable(); 
CGPathAddArc(path, NULL,viewFormsUI.center.x,viewFormsUI.center.y, 
                     88,radianOf(243),radianOf(0), YES); //viewFormsUI is an UIView 
CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"position"]; 
[animation setPath:path]; 
[animation setDuration:1];
animation.removedOnCompletion = YES;
animation.fillMode = kCAFillModeForwards; 
[animation setAutoreverses:NO];
CFRelease(path); 
[btnRefreshUI.layer addAnimation:animation forKey:@"curveAnimation"];
                             //btnRefreshUI is an UIButton
radiadof
是一个将角度转换为弧度的函数(只返回M_PI*(角度/180))的值)

但问题是,UIC元件是逆时针旋转的。 我在代码中找不到错误,请帮助我解决问题。

CGPathAddArc(path,NULL,viewFormsUI.center.x,viewFormsUI.center.y,88,radiaof(243),radiaof(0),是的

尝试将是更改为

CGPathAddArc(路径,NULL,viewFormsUI.center.x,viewFormsUI.center.y, 88,弧度为(243),弧度为(0),NO

这是-bool顺时针

CGPathAddArc(路径,NULL,viewFormsUI.center.x,viewFormsUI.center.y,88,弧度(243),弧度(0),

尝试将是更改为

CGPathAddArc(路径,NULL,viewFormsUI.center.x,viewFormsUI.center.y, 88,弧度为(243),弧度为(0),NO


这是-bool顺时针方向

如果将
radiadof(0)
更改为
radiadof(360)
?@rmaddy它是逆时针方向从0旋转到360I,这意味着如果执行
CGPathAddArc(path,NULL,viewFormsUI.center.x,viewFormsUI.center.y,88,radiadof(243),radiadof(360),会发生什么情况
@rmaddy仍然是逆时针方向如果将
radiadof(0)
更改为
radiadof(360)
,会发生什么?@rmaddy从0到360I逆时针方向旋转意味着如果执行
CGPathAddArc(path,NULL,viewFormsUI.center.x,viewFormsUI.center.y,88,radiadof(243),radiadof(360),会发生什么@rmaddy仍处于逆时针方向