button旋转动画

旋转动画

 */

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

    

}

posted @ 2017-03-14 10:17  十点听风  阅读(311)  评论(0编辑  收藏  举报