我需要设置 CATextLayer
的颜色动画,动画本身可以工作:
CAKeyframeAnimation * animation = [CAKeyframeAnimation animationWithKeyPath :@“foregroundColor”];
 animation.duration = 1.0f;
 animation.values = @ [(id)([UIColor redColor] .CGColor),(id)([UIColor blueColor] .CGColor )];
 [textLayer addAnimation:animation forKey:@“animation”];



 但是,如果我想控制通过将图层的速度设置为0来动画进度,它不起作用:


 animation.speed = 0;
 ...&# xA; textLayer.timeOffset = 0.5f;



 我错过了什么?


由于
&#XA!;