I have a similar question as in the link below
Why am I using "pan" after rotae pretends in the opposite way?
But this link also did not solve my problem. I use pan, pinch and rotation for the same UIImage. When I rotate this image and perform panning, it will give random panning (sometimes it happens in the opposite direction of panning. I also set the anchor point (0.5.0.5)). But, if I use only panning (that is, before rotation), it will work fine as expected. How can I solve this problem?
Finally, I solved this problem ... You just need to change the code below CGPoint translation = [gesture translationInView:gesture.view]; on CGPoint translation = [gesture translationInView:[gesture.view superview]]; present within the UIPanGestureRecognizer method.
CGPoint translation = [gesture translationInView:gesture.view];
CGPoint translation = [gesture translationInView:[gesture.view superview]];
OR follow the link below http://cs354dory.wordpress.com/code-examples/pinch-pan-and-rotate/
I decided that too.
Just put these 2 lines of code in a rotation function.
gestureRecognizer.view.transform = CGAffineTransformRotate(gestureRecognizer.view.transform, gestureRecognizer.rotation); gestureRecognizer.rotation = 0;
Source: https://habr.com/ru/post/925901/More articles:Namespace prefix and cdata tags in xml generation for RSS feed in Ruby on Rails - ruby | fooobar.comHow to know when an image is uploaded to Picturebox - c #The difference between ordered and unordered (root) trees - algorithmWicket Interpretation: Multiple Property Files for Multiple Pages? - internationalizationOffline Routed iPhone Map - dictionaryhow to detect paste event in excel - vbaSELECT several rows WHERE satisfying two conditions - sqlWhy do I use "pan" after rotae pretends to be the opposite? - objective-chow to write using the encoding of a single byte character? - c #Need to write JUnit Test case - javaAll Articles