`

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"];
 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics