UIImageView 旋转

CABasicAnimation* rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
rotationAnimation.toValue = [NSNumber numberWithFloat:(DEGREES_TO_RADIANS(360))];
rotationAnimation.duration = .85;
rotationAnimation.repeatCount = 999999;
rotationAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];

[_mImage.layer addAnimation:rotationAnimation forKey:@"revItUpAnimation"];

//
[_mImage.layer removeAnimationForKey:@"revItUpAnimation"];
 

你可能感兴趣的:(ios,iPhone开发,UIImageView)