I have similar question as in below link
Why I use "pan" after rotae will make view go opposite way?
But, this link also didn't solved my problem. I am using pan, pinch and rotation gesture for same UIImage. When, i rotate that image, and performs pan, it will give random panning(sometimes it goes in opposite direction of panning. I also set anchor point to (0.5,0.5)). But, if i only use pan (i.e. before rotation) it will perform well as expected. How can i resolve this issue?
Finally solved this issue... You just need to change below code CGPoint translation = [gesture translationInView:gesture.view];
to CGPoint translation = [gesture translationInView:[gesture.view superview]];
present inside UIPanGestureRecognizer method.
OR follow below link http://cs354dory.wordpress.com/code-examples/pinch-pan-and-rotate/
I solved it,too.
Just put these 2 lines of code into the rotationfunction.
gestureRecognizer.view.transform = CGAffineTransformRotate(gestureRecognizer.view.transform, gestureRecognizer.rotation);
gestureRecognizer.rotation = 0;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With