CGAffineTransform scale and translation - jump before animation

后端 未结 5 1120
孤独总比滥情好
孤独总比滥情好 2021-02-01 03:43

I am struggling with an issue regarding CGAffineTransform scale and translation where when I set a transform in an animation block on a view that already has a transform the vie

5条回答
  •  無奈伤痛
    2021-02-01 04:30

    Instead of CGAffineTransformMakeScale() and CGAffineTransformMakeTranslation(), which create a transform based off of CGAffineTransformIdentity (basically no transform), you want to scale and translate based on the view's current transform using CGAffineTransformScale() and CGAffineTransformTranslate(), which start with the existing transform.

提交回复
热议问题