我正在使用CABasicanimation旋转UIView。我正在使用此代码,
CABasicAnimation *rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
NSNumber *currentAngle = [CircleView.layer.presentationLayer valueForKeyPath:@"transform.rotation"];
rotationAnimation.fromValue = currentAngle;
rotationAnimation.toValue = @(50*M_PI);
rotationAnimation.duration = 50.0f; // this might be too fast
rotationAnimation.repeatCount = HUGE_VALF; // HUGE_VALF is defined in math.h so import it
[CircleView.layer addAnimation:rotationAnimation forKey:@"rotationAnimationleft"];
在这种情况下,我想在“UIView”旋转时获得完美的X,Y位置。
如果有人知道,请帮助我。
先感谢您。
最佳答案
我已经回答了这个问题,请转到此链接进行回答
Go to This Link For Answer