禁用某个界面的侧滑 push到下个界面 触发侧滑卡死的情况
使用方式不对
正确使用方式:
overridefuncviewDidAppear(_animated:Bool) {
super.viewDidAppear(animated)
self.navigationController?.interactivePopGestureRecognizer?.isEnabled = false
}
overridefuncviewWillDisappear(_animated:Bool) {
super.viewWillDisappear(animated)
self.navigationController?.interactivePopGestureRecognizer?.isEnabled = true
}
网友评论