Question

is there any way to get the ios7 swipe back functionality if I have a custom backbuttom item? With the functionality I mean exactly the same: swiping the finger while the back view is getting visible and be able to swipe left to don't popback.

Thanks in advance!

Was it helpful?

Solution

I found a nice way to add this great animation if you have a custom backbutton:

self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]
                                         initWithImage:img
                                         style:UIBarButtonItemStylePlain
                                         target:self
                                         action:@selector(onBack:)];
self.navigationController.interactivePopGestureRecognizer.delegate = (id<UIGestureRecognizerDelegate>)self;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top