0x00

一行代码:

[_scrollView.panGestureRecognizer requireGestureRecognizerToFail:self.navigationController.interactivePopGestureRecognizer];

还应该在生命周期方法内处理一下:

- (void)viewDidDisappear:(BOOL)animated{
[super viewDidDisappear:animated];
self.navigationController.interactivePopGestureRecognizer.enabled = YES;
}

0x01

如果你页面过于复杂,试试下面这个方法

    NSArray *gestureArray = self.navigationController.view.gestureRecognizers;
for (UIGestureRecognizer *gesture in gestureArray) {
if ([gesture isKindOfClass:[UIScreenEdgePanGestureRecognizer class]]) {
[_scrollView.panGestureRecognizer requireGestureRecognizerToFail:gesture];
}
}

这个心形遮罩有点意思

​https://github.com/xjh093/JHViewCorner​