CGAffineTransform scale and translation - jump before animation

后端 未结 5 1148
孤独总比滥情好
孤独总比滥情好 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:15

    Looks like Apple UIView animation internal bug. When Apple interpolates CGAffineTransform changes between two values to create animation it should do following steps:

    • Extract translation, scale, and rotation
    • Interpolate extracted values form start to end
    • Assemble CGAffineTransform for each interpolation step

    Assembling should be in following order:

    • Translation
    • Scaling
    • Rotation

    But looks like Apple make translation after scaling and rotation. This bug should be fixed by Apple.

提交回复
热议问题