禁止页面右滑pop回页面
作者:
张家杰仔 | 来源:发表于
2017-06-05 15:06 被阅读17次- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
self.navigationController.interactivePopGestureRecognizer.delegate = self;
}
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
self.navigationController.interactivePopGestureRecognizer.delegate = nil;
}
// 给该控制器添加协议 <UIGestureRecognizerDelegate>
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
{
return gestureRecognizer != self.navigationController.interactivePopGestureRecognizer;
}
本文标题:禁止页面右滑pop回页面
本文链接:https://www.haomeiwen.com/subject/xlwifxtx.html
网友评论