In my app I have different controllers. When I push controller1 to navigation controller and swipe to back, all works good. But, if I push navigation controller1, and into controller1 push controller2 and try to swipe to back I get a frozen application. If go back through back button all works fine.
How can I catch the problem?
I had same issue and I found below solution. add below controller
Can refer below link
http://keighl.com/post/ios7-interactive-pop-gesture-custom-back-button/
My solution was to add a delegate to the navigation controller. Then disable the pop gesture recogniser in the root view controller only. YMMV.
Swift 4:
Set the delegate,
Implement the delegate method,
I solved my problem by UINavigationController interactivePopGestureRecognizer working abnormal in iOS7 and set
self.navigationController.interactivePopGestureRecognizer.delegate = self;
on every viewcontroller's- (void)viewWillAppear:(BOOL)animated
I had similar problem with freezing interface when using swipe-to-pop gesture. In my case the problem was in controller1.viewDidAppear I was disabling swipe gesture:
self.navigationController.interactivePopGestureRecognizer.enabled = NO
. So when user started to swipe back from contorller2, controller1.viewDidAppear was triggered and gesture was disabled, right during it's work.I solved this by setting
self.navigationController.interactivePopGestureRecognizer.delegate = self
in controller1 and implementinggestureRecognizerShouldBegin:
, instead of disabling gesture recognizer:I would suggest you to try this. This works perfectly for me. You can still enjoy Interactive swipe.