在b控制器中加入
self.navigationController.interactivePopGestureRecognizer.delegate= (id)self;
self.navigationController.interactivePopGestureRecognizer.enabled=YES;
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
self.navigationController.interactivePopGestureRecognizer.enabled = NO;}