动画结束回调CALayer? [英] Animation End Callback for CALayer?
问题描述
使用iPhone CALayer,我想要一个旋转动画我的精神层,但我还想要一个回调的动画结束,热,这样做?
我想也许我应该使用CABasicAnimation,但我不知道如何使用CABasicAnimation旋转,任何想法?
感谢
如果为CAAnimation设置了委托,可以添加回调方法:
- (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag
pre>
动画完成时调用。通过CGAffineTransform转换矩阵查找旋转动画的示例,如以下链接所示:
http://iphonedevelopment.blogspot.com/2008/10/demystifying-cgaffinetransform.html
Using iPhone CALayer, I want a rotation animation for my spirit layer, but I also want a callback for the animation end, hot to do that?
I think maybe I should use CABasicAnimation, but I don't know how to do rotation using CABasicAnimation, any idea?
Thanks
解决方案If you set a delegate for a CAAnimation, you can add the callback method:
- (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag
That gets called when the animation is complete. Look for examples of rotating animations via a CGAffineTransform transformation matrix, as per this link:
http://iphonedevelopment.blogspot.com/2008/10/demystifying-cgaffinetransform.html
这篇关于动画结束回调CALayer?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!