图片自动旋转

CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform"];

animation.delegate = self;

animation.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeRotation(M_PI , 0, 0, 1.0)];

animation.duration = 5;

animation.cumulative = YES;

animation.repeatCount = INT_MAX;

[_sunImageView.layer addAnimation:animation forKey:@"animation"];


你可能感兴趣的:(图片自动旋转)