- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
self.navigationController.interactivePopGestureRecognizer.delegate = self;
}
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer{
DLog(@"%ld子VC",self.navigationController.childViewControllers.count);
return self.navigationController.childViewControllers.count > 1;//是不是rootvc
}
// self.navigationController.navigationBarHidden = NO;
尽量用下边这个来隐藏显示.不解释,都是坑
[self.navigationController setNavigationBarHidden:NO animated:YES];
注:FDFullscreenPopGesture 这个很6,可以搜一下,一句代码都不需要就可以实现
网友评论