Get current CAAnimation transform value

前端 未结 4 675
感情败类
感情败类 2021-01-11 23:11

I want to access get the value of the transform scale at a point in time. Here is the animation creation :

    CABasicAnimation *grow = [CABasicAnimation ani         


        
4条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-11 23:43

    swift version of @Duncan C answer will be:

    let currentValue = someView.layer.presentation()?.value(forKeyPath: "transform.scale")
    

提交回复
热议问题