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 = 10000;
    [imageView.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"];

持续更新~

你可能感兴趣的:(iOS中让一张图片旋转)