只需要创建一个imgview,然后赋予图片和坐标
粘贴下面的代码就好啦。。。
旋转动画开启
- (void)rotateView:(UIImageView *)view
{
CABasicAnimation *rotationAnimation;
rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
rotationAnimation.toValue = [NSNumber numberWithFloat:M_PI*2.0];
rotationAnimation.duration = 1;
rotationAnimation.repeatCount = HUGE_VALF;
[view.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"];
}
结束
[self.loadImgView.layer removeAllAnimations];