旋转动画
*/
-(void)mapBtnAnimation{
CABasicAnimation* rotationAnimation;
rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform"];
rotationAnimation.fromValue = [NSValue valueWithCATransform3D:CATransform3DIdentity];
rotationAnimation.toValue = [ NSValue valueWithCATransform3D:CATransform3DMakeRotation(M_PI, 0.0, 0.0, 1.0) ];
rotationAnimation.duration = 1.0;
rotationAnimation.cumulative = YES;
rotationAnimation.repeatCount = MAXFLOAT;
[self.showMapBtn.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"];
}
时间: 2024-10-12 03:28:23