旋转360度动画

CABasicAnimation* rotationAnimation;

    rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];

    rotationAnimation.toValue = [NSNumber numberWithFloat: M_PI * 2.0 ];

    rotationAnimation.duration = 0.5;

    rotationAnimation.cumulative = YES;

    rotationAnimation.repeatCount = 1;

    

    [self.animationView.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"];

posted @ 2015-08-11 16:22  金刚葫芦娃哈哈  阅读(147)  评论(0编辑  收藏  举报