I've got a UIScrollView
with paging enabled, and I've added my own UIPanGestureRegonizer
to it. Under certain instances, my view controller will set scrollview.scrollEnabled = NO
, and then add the pan gesture recognizer to it (I'm not using the scrollview's own recognizer).
So, scrolling is disabled but I'm waiting for user touches from my gesture recognizer. When it recognizes, it calls its action in which I re-enable scrolling.
The problem is, while the user still has a finger down, my scrollview doesn't track with the finger. It doesn't start scrolling until the finger is lifted and then dragged again. So my gesture recognizer is swallowing all the touches and not forwarding any to the scrollview.
I've tried toggling panGestureRecognizer.cancelsTouchesInView = NO;
but it doesn't seem to have any effect (I'm currently removing this recognizer as soon as I re-enable scrolling but whether I do this or not doesn't solve my problem). I've also looked into the delays...
properties of UIGestureRecognizer
but they don't seem to be helping, either.
Any ideas? How can I get these events to continue to forward to my scrollview?
YES
ingestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:
method? – Ilise