andreamazz / SlideOutNavigation

SlideOut Navigation Controller for iOS.
MIT License
210 stars 49 forks source link

Disable AMOptionsEnableGesture just in one view #51

Closed jyap808 closed 10 years ago

jyap808 commented 10 years ago

Hi, I was wondering if it was possible to disable AMOptionsEnableGesture just in one view?

The issue is that UIPanGestureRecognizer interferes with swipe to delete on a UITableViewController. Basically swipe to delete no longer works.

Or perhaps you know a workaround so that AMOptionsEnableGesture works with swipe to delete on a UITableViewController.

andreamazz commented 10 years ago

Hi @jyap808, you can just set the AMOptionsEnableGesture option to false on your controller's viewWillAppear: method, and set it as true on your viewWillDisappear: like this:

[yourAppDelegate.slideOutController setSlideoutOptions:@{AMOptionsEnableGesture: @(enabled)}];
jyap808 commented 10 years ago

That works for me. Thanks!

I think there are some workarounds since now swipe to delete only works for right-to-left swiping.