fastred / SloppySwiper

UINavigationController delegate that allows swipe back gesture to be started from anywhere on the screen (not just from the edge).
MIT License
806 stars 107 forks source link

How to turn SloppySwiper off, and on again? #19

Closed nharbo closed 7 years ago

nharbo commented 7 years ago

Hi! Thanks for SloppySwiper - it really eases my work :-) But I would like to ask, how it's possible to turn if off, and then on again? I've tried to set the navigationController's delegate to nil to turn it off, without any luck.. Is there anything buildin that i'm missing? :-)

nharbo commented 7 years ago

nevermind, I managed to fix it like this: swiper.panRecognizer.requireGestureRecognizerToFail(swiper.panRecognizer)

:-)

fastred commented 7 years ago

Cool!

InfiniteDreamz commented 5 years ago

@nharbo Hey, I want the same thing in my application.

if let temSwiper = self.navigationController?.delegate as? SloppySwiper { temSwiper.panRecognizer.require(toFail: temSwiper.panRecognizer) self.navigationController?.delegate = nil } It is not working.