iOS 小动画

  一。图片旋转

  CABasicAnimation* rotationAnimation;

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

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

        rotationAnimation.duration = 1;

        rotationAnimation.cumulative = YES;

        rotationAnimation.repeatCount = 0;

        [customView.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"];

posted on 2014-08-12 11:21  darren.yang  阅读(199)  评论(0编辑  收藏  举报

导航