UIPageviewController
has a gestureRecognizers
property
My guess is that one if its gesture recognizer and yours - if your using one - can't act simultaneously.
You could handle that through the gestures' methods, see question for handling multiple UITapGestureRecognizers, requiring your webView tap recognizer to fail for pageViewController's tap to succeed.
Like this (not tested)
UILongPressGestureRecognizer *yourTapGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPress:)];
for(UIGesture *gesture in yourPageController.gestureRecognizers){
[gesture requireGestureRecognizerToFail:yourTapGesture];
}
[pageControllerTap requireGestureRecognizerToFail:yourTapGesture];
Also, I don't understand why you need userInteractionEnabled
, is your UIWebView
taking all space ? You could attach the gesture to webView's superview, and test webView-hit with locationInView:
method.