Danoli3 Danoli3 - 1 year ago 96
Objective-C Question

How to turn off the automatic gesture to go back a view with a navigation controller?

So I'm noticing all of my views are receiving the gesture to go back (pop a view) when the user swipes on the very left side of the screen (in either orientation) (This is new with iOS7)

I've tried so far with no avail to turn it off using:

[self.navigationItem setHidesBackButton:YES];

Within the init of the NavigationController itself (as the delegate seems to be using that).

Answer Source


self.navigationController.interactivePopGestureRecognizer.enabled = NO;


navigationController?.interactivePopGestureRecognizer?.enabled = false
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download