动画结束回调CALayer? [英] Animation End Callback for CALayer?

查看:131
本文介绍了动画结束回调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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆