CGAffineTransformMakeRotation counter clockwise always

前端 未结 2 1655
南笙
南笙 2020-12-10 06:50

I an trying to animate a UIImageView to rotate counter clockwise when a user touches it and moves its finger on it in clockwise direction.
Basically I want

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-10 07:01

    The technique I've used is to divide the rotation angle by 2 and separate the rotate into two separate animations, linked by the completion: parameter of animateWithDuration:delay:options:animations:completion:. But, since the view has been rotated to its current position, you need to start with that position and "unrotate" back to zero, vs attempting to rotate CCW from zero.

提交回复
热议问题