iOS 26 how to disable swipe to navigate back

How do we disable the new swipe left anywhere to navigate back? I already use that swipe motion for custom actions in my app.

Answered by BabyJ in 847513022

In iOS 26, UINavigationController has a new property called interactiveContentPopGestureRecognizer and is described as this:

The interactive content pop gesture recognizes on the entire content area of the navigation controller in cases that are not covered by the interactive pop gesture recognizer and initiates an interactive pop. This property should only be used to set up failure requirements with it.

So I believe now the pop gesture properties are defined as so:

  • interactivePopGestureRecognizer is the swipe from the edge gesture
  • interactiveContentPopGestureRecognizer is the swipe anywhere in the main content gesture

So by disabling both gesture recognisers, you should be good to implement your custom swipe gestures.

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

I haven't tested this to be sure, but if you are in UIKit, you'd want to look into UIGestureRecognizerDelegate and its methods through which you control which gesture should fail in favor of another gesture.

For this to work, you'd have to be the delegate of UINavigationController's interactivePopGestureRecognizer - which again I haven't tested, but I'm assuming Apple hadn't created a brand-new gesture for this iOS 26's swipe-anywhere-to-go-back gesture.

(I'm uncertain about SwiftUI though.)

Accepted Answer

In iOS 26, UINavigationController has a new property called interactiveContentPopGestureRecognizer and is described as this:

The interactive content pop gesture recognizes on the entire content area of the navigation controller in cases that are not covered by the interactive pop gesture recognizer and initiates an interactive pop. This property should only be used to set up failure requirements with it.

So I believe now the pop gesture properties are defined as so:

  • interactivePopGestureRecognizer is the swipe from the edge gesture
  • interactiveContentPopGestureRecognizer is the swipe anywhere in the main content gesture

So by disabling both gesture recognisers, you should be good to implement your custom swipe gestures.

navigationController?.interactivePopGestureRecognizer?.isEnabled = false
navigationController?.interactiveContentPopGestureRecognizer?.isEnabled = false
iOS 26 how to disable swipe to navigate back
 
 
Q