1
我在每次拖动时将视图旋转45度。这是我的代码。这里的问题是视图只旋转一次。之后,没有旋转。原因是什么?任何帮助在touchesMoved中查看旋转
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
CGContextRef context = UIGraphicsGetCurrentContext();
[UIView beginAnimations:nil context:context];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0];
dialView.transform = CGAffineTransformMakeRotation(45* M_PI/180);
[UIView commitAnimations];
}