I have UIView
and I attached to it a UIPanGestureRecognizer
.
inside the UIView
I have UIScrollView
with paging enabled and I set the content size so scrollView could be scrolled just to the left.
the problem:
I want when user try to drag scrollView To the right, to send the event up to UIView so 'UIPanGestureRecognizer' can handle the touch event
at last, after 6 hours I figure it out I subclassed
UIScrollView
and implementedgestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer
delegate methodwhen user drag over the scrollView this method get called
(BOOL)gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer
and by default it returns NO