CAKeyframeAnimation *theAnimation = [CAKeyframeAnimation animation];
theAnimation.values = [NSArray arrayWithObjects:
[NSValue valueWithCATransform3D:CATransform3DMakeRotation(0, 0,0,1)],
[NSValue valueWithCATransform3D:CATransform3DMakeRotation(3.13, 0,0,1)],
[NSValue valueWithCATransform3D:CATransform3DMakeRotation(6.26, 0,0,1)],
nil];
theAnimation.cumulative = YES;
theAnimation.duration = 1.0;
theAnimation.repeatCount = 5;
theAnimation.removedOnCompletion = YES;
沒有留言:
張貼留言