CABasicAnimation get value steps for 30

I've got a CABasicAnimation that is operating on the transform property of a CALayer. The animation looks fairly cool and it all works fine, but now I want to know through which values the transform of the layer is going to go through for a perfect 30/60 FPS animation.

I don't want to run the aniamtion and measure the values, I want to know beforehand.

The timingFunction has to be taken into account for this calculation.

How can I find out these transform values?

That's the animation code:

CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath: @"transform"];
animation.fromValue = [NSValue valueWithCATransform3D: _myLayer.transform];
animation.toValue   = valueTransform;
animation.duration  = 0.7;
animation.timingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseInEaseOut];
[_myLayer addAnimation: animation forKey:@"transformAnimation"];
链接地址: http://www.djcxy.com/p/74188.html

上一篇: 出现视图后重新启动CoreAnimation

下一篇: CABasicAnimation获得值为30的步骤