Disabling ‘slide from left’ back button in iOS7

Guides | Tutorial By 4 years ago

In iOS7, if a user wants to go back a page they can now choose between using the old back button or a newly introduced method by dragging from the left side of the screen. However this may not suit every developer’s app, and there’s a pretty easy way to disable it.

Whenever you setup your UINavigationController, simply get it’s interactivePopGestureRecognizer and disable it, as so:

[navigationController.interactivePopGestureRecognizer setEnabled:NO];