In an iPhone app, we have the ability to hide the navigation bar. By default, calling [self.navigationController setNavigationBarHidden:YES animated:YES]
to hide the navigation bar stops the screen edge gesture recognizer self.navigationController.interactivePopGestureRecognizer
from working, but in the past I could restore this functionality by setting its delegate
to my own (while the bar is hidden) that does this:
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
return YES;
}
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldBeRequiredToFailByGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
return ![otherGestureRecognizer isKindOfClass:[UIScreenEdgePanGestureRecognizer class]];
}
However, this doesn't work now that the app is using UISplitViewController
.
It's unclear if the split view controller is using its own gesture recognizer, or some other issue. I haven't been able to figure out how to make it work.
I can't find any other discussion on this. The most recent posts I've found are years old, e.g. this one, this one, or this one.
What am I missing? How can I get a screen edge interactive gesture to work with UISplitViewController
when the navigation bar is hidden?