我有一些简单的动画代码:
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:duration];
[UIView setAnimationCurve:curve];
[UIView setAnimationBeginsFromCurrentState:YES];
// The transform matrix
CGAffineTransform transform = CGAffineTransformMakeTranslation(x, y);
image.transform = transform;
// Commit the changes
[UIView commitAnimations];是否可以将动画的每一帧都作为uiimage?
发布于 2012-07-11 00:21:34
您不能以UIImages格式获取每一帧(除非您在动画视图的帧上以非常快的速度使用UIGraphicsGetCurrentContext,我甚至不确定这是否有效),但是使用核心动画,您可以访问CALayer的presentationLayer属性,该属性(从CALayer Class Reference):
返回包含所有属性的层的副本,这些属性与当前事务开始时的一样,并应用了所有活动动画。
希望这能有所帮助!
https://stackoverflow.com/questions/11416464
复制相似问题