In iOS apps, there is a default gesture that swipe from the left edge to right the app navigationController
will pop view controller.
But is there a way to disable it for specific view?
You can disable it through the public API, See UINavigationController Class Reference
//iOS7 Customization, swipe to pop gesture
if ([navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
navigationController.interactivePopGestureRecognizer.enabled = NO;
}
Also, you can switch back to previous state when needed
if(navigationController) {
if ([navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
navigationController.interactivePopGestureRecognizer.enabled = NO;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With