@property (nonatomic, strong) UIViewController *currentShowVC; //设置代理 self.navigationController.interactivePopGestureRecognizer.delegate =(id)self; self.navigationController.interactivePopGestureRecognizer.enabled = YES; ){ //将当前导航控制器置空 self.currentShowVC = Nil; }else{ self.currentShowVC = self; } - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer { if (gestureRecognizer == self.navigationController.interactivePopGestureRecognizer) { //the most important return (self.currentShowVC == self.navigationController.topViewController); } return YES; } self.navigationController.interactivePopGestureRecognizer.delegate = self;
待整理。。。。。