It sounds like one of those times when you need something completely specific and custom. Therefore, attempts to do something smart with gesture recognizers will not be enough.
The main problem is that methods for managing gesture recognizers, such as gestureRecognizer:shouldReceiveTouch:
and gestureRecognizerShouldBegin:
only affect the beginning of gestures (or new touches, not current ones), but you want one continuous gesture to switch between control of each species. Therefore, for this reason, I think you will need to place a large transparent view on the entire screen using the gesture recognizer on the hard disk, and in your handlePan method, select which view you want to configure, and then call setContentOffset
directly in this view. You can use the translation of the pan recognizer and the existing content offset to calculate a new one. I know that this is not very elegant, but I cannot think of another way to achieve the desired effect.
source share