I am currently working for frames and photo-editing application. I am struggling with text editing feature, in which pan, pinch and rotate gestures are already implemented. Now I want to include touches too.
(Reason for adding touches: dynamically changing height of UITextView. Here is the practical implementation of what I want touches to do for me: https://i.stack.imgur.com/hlAUn.jpg
PS: this functionality is not given by any of the gesture).
I removed the pan gestures and applied touchesBegan and touchesMove gesture but issue comes here: It is lagging a lot and after several touches it changes the height.
Can we apply gestures and touches together without compromising in performance? Any suggestion would be highly appreciated !!
I think you can achieve both effects by only implementing the pan gesture.
The trick is to determine what kind of dragging action it is when the pan gesture state first began in the UIPanGestureRecognizer callback.
If the touch point is within let's say 5% of the view border, then we know the subsequent dragging would be used to do dynamic resizing until the gesture ended, otherwise it's simply a pan and we move the center of the view to the new coordinates of the pan.