在我的应用程序中,我使用以下动画使我的 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
radianOf
是将角度转换为弧度的函数(只返回 M_PI*(angle/180) 的值)
但问题是 UIElement 正在逆时针方向旋转。我在我的代码中找不到错误,请帮助我。