CATransaction 和 CAAnimation 之间有什么区别?
也许与某些问题重复,但我在这里找不到它们。
maybe duplicated with some question, but I can't find them here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
也许与某些问题重复,但我在这里找不到它们。
maybe duplicated with some question, but I can't find them here.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
CATransaction是CAAnimation的派生类,它可以同时修改多个图层的属性。
它有两种类型的交易:
a. 显式事务,通过显式调用“begin”、“commit”提交动画,重置时长。事务可以嵌套;
b. 隐式交易。除了显式事务外,对CALayer属性的任何修改都是隐式事务,因此事务将在运行循环中提交。
希望对你有帮助。
CATransaction is a derived class of CAAnimation.It can modify properties of multiple layers at same time.
It has two types of transactions:
a. explicit transaction, Submitting animation by invoking "begin","commit" explicitly,Reset duration.Transactions can be nesting;
b. implicit transaction. In addition to explicit transaction, any modifications for CALayer properties are implicit transaction, so the transaction will be submitted in the run-loop.
Hope it helps u.
有几个很好的链接可以理解差异,
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreAnimation_guide/Articles/Transactions.html
http://zearfoss.wordpress.com/2011/02/24/核心动画-catransaction-protip/
There are couple of good links to understand the difference,
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreAnimation_guide/Articles/Transactions.html
http://zearfoss.wordpress.com/2011/02/24/core-animation-catransaction-protip/