- 方法一(不是很好用,有的能用,有的不能用)
self.navigationController?.interactivePopGestureRecognizer?.isEnabled = false
- 方法二(添加一個手勢和系統(tǒng)返回手勢造成沖突)
let obj = self.navigationController?.interactivePopGestureRecognizer?.delegate
let pan = UIPanGestureRecognizer(target: obj, action: nil)
self.view.addGestureRecognizer(pan)```