The point is, in your handRotate method handRotate you assign a rotation transformation to your view. This entails a constant (until you change the transformation again) change the way your view is displayed within your supervisor, and the rotation transformation will always be βaddedβ to any other changes that you make with the geometric properties of your view.
Which explains the behavior you see is the interaction between the position of your view and its anchor point, as described in Layer Geometry and Transform , in other words, the center property that you change when panning is the result of applying all the transformations that you define for your representation. On the other hand, what you are trying to do when panning requires a change in the position of the view before the transformation is applied.
To do this, rephrase your code using layers ( CALayer ) and change the layer position property instead of the center view. How in:
recognizer.view.layer.position = ...
I think this should fix it.
(You will need to import QuartzCore to compile).
Hope this helps.
source share