swift 关闭侧滑返回手势

戳这里 https://www.jianshu.com/p/fcbde164ee1c


// 关闭侧滑返回手势,。
if (navigationController?.responds(to: #selector(getter: navigationController?.interactivePopGestureRecognizer)))! {
navigationController?.interactivePopGestureRecognizer?.isEnabled = false
} 这个不起作用 有人遇到么


// 关闭侧滑返回手势,。
if (navigationController?.responds(to: #selector(getter: navigationController?.interactivePopGestureRecognizer)))! {


for popGesture in (self.navigationController?.interactivePopGestureRecognizer?.view?.gestureRecognizers)! {
popGesture.isEnabled = false
}
}









Loading Disqus comments...
Table of Contents