Change animation time for properties of a CALayer

前端 未结 3 517
遇见更好的自我
遇见更好的自我 2021-02-04 16:27

I have a CALayer to animate a change in its image contents. Now, how can I change how long it takes for this animation to take place?

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-04 17:16

    You can just call:

    [CATransaction setAnimationDuration:durationSecs] 
    

    in -layoutSublayers or anywhere else that you modify the layers and expect them to implicitly animate. This will effect the current implicit transaction and any sub-transactions within this one.

提交回复
热议问题