标签:interactivepopgestur swipe swift
如何开启:
1.ViewController实现 UIGestureRecognizerDelegate 协议
class YourViewController: UIGestureRecognizerDelegate { func viewDidLoad() { navigationItem.setLeftBarButtonItems([...,...]) // swipe back 失效了 self.navigationController?.interactivePopGestureRecognizer.delegate = self // 启用 swipe back } }
override func viewDidAppear(animated: Bool) { navigationController?.interactivePopGestureRecognizer.enabled = false // disable pop gesture }
当自定义leftBarButtonItem(s)左边缘滑动失效时
标签:interactivepopgestur swipe swift
原文地址:http://blog.csdn.net/tounaobun/article/details/42012661