您可以从屏幕的左边缘轻扫以返回导航堆栈。但是在我的应用程序中,此行为与我的自定义左侧菜单冲突。因此,是否可以在UINavigationController中禁用此新手势?
最佳答案
从控制器,您只想启用/禁用它
迅速:
self.navigationController?.interactivePopGestureRecognizer?.isEnabled = false // or true
对象:
self.navigationController.interactivePopGestureRecognizer.enabled = NO; // or YES