If you subclass the UINavigationController, the simplest fix is as follows (iOS 9.3, Swift 2.2):
override func viewDidLoad() { super.viewDidLoad() interactivePopGestureRecognizer?.delegate = nil }
Alternatively, in any other instance of the UIViewController:
override func viewDidLoad() { super.viewDidLoad() navigationController?.interactivePopGestureRecognizer?.delegate = nil }
Implementing the delegate method navigationController(_:animationControllerFor:from:to:) disables the gesture recognition recognizer of the navigation controller, but setting the delegate gesture to nil reactivates it.
If you want the gesture to be included in certain circumstances, see this answer .
source share