如何让View一直沿z轴旋转

#import <QuartzCore/QuartzCore.h>
...

CABasicAnimation *rotationAni = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; rotationAni.toValue = [NSNumber numberWithFloat:M_PI*2]; rotationAni.duration = 0.5; rotationAni.cumulative = YES; rotationAni.repeatCount = 10000; [indicatorView.layer addAnimation:rotationAni forKey:@"rotationAnimation1"];
原文地址:https://www.cnblogs.com/ihojin/p/rotate-repeat-z.html