我正在开发一个应用程序,其中我将视图旋转 360 度,但我无法将其旋转 360 度。它旋转了 180 度,旋转后又回到了原来的位置。
animation = [CABasicAnimation animationWithKeyPath:@"transform"];
transform = CATransform3DMakeRotation(3.14f, 1.0f, 1.0f, 1.0f);
value = [NSValue valueWithCATransform3D:transform];
[animation setToValue:value];
[animation setAutoreverses:YES];
[animation setDuration:0.9];
[[rotatBall layer] addAnimation:animation forKey:@"180"]; //rotatBall is a view
换句话说,它正在来回旋转。如何连续旋转它......请帮助......