栈底控制器去掉左滑手势

@interface BaseNavigationController () <UINavigationControllerDelegate>

@end

@implementation BaseNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.delegate = self;
}

- (void)navigationController:(UINavigationController *)navigationController
       didShowViewController:(UIViewController *)viewController
                    animated:(BOOL)animated {
   if (viewController == navigationController.viewControllers[0]) {
       navigationController.interactivePopGestureRecognizer.enabled = NO;
   } else {
       navigationController.interactivePopGestureRecognizer.enabled = YES;
   }
}

@end
原文地址:https://www.cnblogs.com/cchHers/p/12519998.html