How can we disable swipe back to dismiss a UIViewController in iOS 26? (UIKit)

2 weeks ago 23
ARTICLE AD BOX

Running some tests in an iOS 26.1 simulator, interactivePopGestureRecognizer.isEnabled = false isn't preventing the "swipe-to-pop" gesture from working for me either.

I found that adding the new interactiveContentPopGestureRecognizer along with the old interactivePopGestureRecognizer solved the issue.

navigationController?.interactivePopGestureRecognizer?.isEnabled = false navigationController?.interactiveContentPopGestureRecognizer?.isEnabled = false

Adding these lines in the viewDidAppear of the root view controller class disabled the "swipe-to-pop" gesture.

Read Entire Article