其他分享
首页 > 其他分享> > iOS开发之--单个页面禁止右滑返回操作

iOS开发之--单个页面禁止右滑返回操作

作者:互联网

禁止右滑:

if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {

        self.navigationController.interactivePopGestureRecognizer.enabled = NO;

    }

允许右滑:

if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {

        self.navigationController.interactivePopGestureRecognizer.enabled = YES;

    }

 

仅做记录!

标签:respondsToSelector,navigationController,self,iOS,selector,interactivePopGestureR
来源: https://www.cnblogs.com/hero11223/p/10476215.html