Observing animated property changes in a CALayer

前端 未结 2 1941
清酒与你
清酒与你 2021-02-02 09:11

I have a CABasicAnimation that animating a property of a CALayer e.g. bounds.origin. I want to be able to observe the property changing ov

2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-02 09:27

    Try using CADisplayLink, which is designed to stay in sync with the animation loop. More info: https://ashfurrow.com/blog/animating-views-with-cadisplaylink/

提交回复
热议问题