如何让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"];

 

posted @ 2013-11-22 16:25  有妄想症的猫zz  阅读(1370)  评论(0编辑  收藏  举报