How to disable re-swipe gesture in UINavigationController in iOS 8?

self.navigationController.interactivePopGestureRecognizer.enabled = NO;

This line no longer has any effect in iOS 8. Putting it in my viewDidLoad method still allows a hard transfer gesture with the navigation controller. Any ideas?

+4
source share
1 answer

Customizing the custom back button image usually does the trick.

self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc]
    initWithTitle:@""
    style:UIBarButtonItemStylePlain
    target:nil
    action:nil];

As a third-party, I usually recommend that you do not violate built-in behaviors like this, especially since most iOS users are very familiar and comfortable with these gestures. Retrieving them simply serves to frustrate users.

, , , . , : , .

+1

All Articles