[英]Adding sublayers while animating parent CALayer in iOs
My parent CALayer is constantly moving with key frame animations. 我的父母CALayer一直在制作关键帧动画。 I need to add sublayers while it is moving.
我需要在移动时添加子层。 Is it possible?
可能吗? Any suggestions on how to achieve this?
关于如何实现这一目标的任何建议?
Answering my question: Create a NSThread
that adds sublayers to the animated layer. 回答我的问题:创建一个
NSThread
,将子层添加到动画层。 Then call [CATransaction flush]
. 然后调用
[CATransaction flush]
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.