我尝试使用CGAffineTransformMakeRotation
和CGAffineTransformRotate
来旋转图像。我想旋转图像从原来的,顺时针旋转到原来的再次(如度0至360)。我需要像播放机上的CD旋转图像。我做了这样的事情:如何从原始图像旋转到图像?
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.1];
CGAffineTransform transform = CGAffineTransformMakeRotation(1.0);
transform = CGAffineTransformRotate(transform, -180);
ImageView.transform = transform;
[UIView commitAnimations];
它只是旋转到180度,如果我将其更改为-300将逆时针旋转(这不正是我需要的)。我不知道我做错了什么,谁能告诉我?