在导航控制器的rootviewcontroller中push一个控制器 出现view重叠现象而且不可点击了,原因是:在rootviewvc页面做横扫手势操作,会影响nav的stack,
直接说解决办法吧,写在rootviewcontroller中
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
self.navigationController.interactivePopGestureRecognizer.enabled = NO;
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
self.navigationController.interactivePopGestureRecognizer.enabled = YES;
}
时间: 2024-10-07 08:15:41