Rotate view using CGAfffineTransformRotate

后端 未结 2 1207
温柔的废话
温柔的废话 2020-12-22 06:13

I have a circular image which I am trying to rotate, so that the yellow and black striped circle stays under the user\'s finger and rotates in both directions. I have this s

2条回答
  •  借酒劲吻你
    2020-12-22 06:54

    I suspect this method gets called A LOT. Try using NSLog and check how many time it does. Anyway, you are not calculating the angle properly, you could try using

    -(CGPoint)translationInView:(UIView *)view
    

    from the recognizer to calculate the correct angle to rotate.

提交回复
热议问题