I had the same situation as @smallwisdom, but was handled differently.
I have a view controller A that I push on top of my navigation controller stack. This view controller A contains a horizontal scroll view that extends all the way from the left side of the screen to the right.
In this case, when I wanted to scroll the screen to the view controller A from the navigation controller stack, all I did was scroll this horizontal scroll view.
The solution is pretty simple.
Inside my view controller A , I have the code:
_contentScrollView = [[UIScrollView alloc] init]; [self.view addSubview:_contentScrollView]; for (UIGestureRecognizer *gestureRecognizer in _contentScrollView.gestureRecognizers) { [gestureRecognizer requireGestureRecognizerToFail:self.navigationController.interactivePopGestureRecognizer]; }
It works great. What does it mean? It tells scrollView gesture recognizers that they need to wait to see if any other gesture recognizer recognizes the current gesture.
If this other one does not recognize, then they will no longer have to wait, and they may try to recognize the current gesture.
If this other recognizer is successful and recognizes the current gesture, all pending gesture recognizers will automatically fail.
This other gesture recognizer that they should wait for is installed as the interactivePopGestureRecognizer navigation controller. He is responsible for napkin to back gestures.
ancajic May 22 '14 at 16:20 2014-05-22 16:20
source share