- 添加代理<UIGestureRecognizerDelegate>
self.navigationController.interactivePopGestureRecognizer.delegate = self;
self.navigationController.interactivePopGestureRecognizer.enabled = YES;
- 代理方法
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
if (self.navigationController.viewControllers.count <= 1 ) {
return NO;
}
return YES;
}
网友评论