旋转动画

CABasicAnimation
* rotationAnimation;
    rotationAnimation = [
CABasicAnimation animationWithKeyPath: @"transform.rotation"
];
    rotationAnimation.
toValue = [ NSNumber numberWithFloat: M_PI * 2.0
];
    rotationAnimation.
duration = 2
;
    rotationAnimation.
cumulative = YES
;
    rotationAnimation.
repeatCount = MAXFLOAT
;
   
    [ self . helpButton . layer addAnimation :rotationAnimation forKey : @"rotationAnimation" ];

猜你喜欢

转载自blog.csdn.net/develop_csdn/article/details/70259839