I noticed something strange and may possibly be a bug in UINavigationController. When you override
-navigationController:animationControllerForOperation:fromViewController
If you've subclassed 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 UIViewController:
override func viewDidLoad() {
super.viewDidLoad()
navigationController?.interactivePopGestureRecognizer?.delegate = nil
}
Implementing the delegate method navigationController(_:animationControllerFor:from:to:)
disables the navigation controller's interactive pop gesture recognizer, but setting the gesture's delegate to nil re-enables it.
If you only want the gesture to be enabled in particular circumstances, see this answer.