iOS 禁用系统滑动返回功能

释放双眼,带上耳机,听听看~!
- (void)viewDidAppear:(BOOL)animated
{
     [super viewDidAppear:animated];
if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {self.navigationController.interactivePopGestureRecognizer.delegate = self;
    }
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {self.navigationController.interactivePopGestureRecognizer.delegate = nil;
    }
}
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
{
     return NO;
}

 

人已赞赏
iOS文章

iOS isKindOfClass和isMemberOfClass的区别

2020-2-10 15:41:26

iOS文章

ios UIImage和base64互转

2020-2-10 16:16:06

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索