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"];
 

猜你喜欢

转载自xyxdasnjss.iteye.com/blog/1665696