I added the SWRevealViewController to my app, along with the hamburger stack to access my menu. My app has a UITableView for the main application view. I want to allow users
I have done like this < UIGestureRecognizerDelegate> in .h file in which you are implementing tableview cell delete functionality and in .m file viewDidLoad
[self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer];
self.revealViewController.panGestureRecognizer.delegate = self;
After that simply use this method
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"])
return NO;
else
return YES;
}
Just found a solution after reading a thread of a guy asking a similar question to the maker of this class. Whatever class you use to add the gesture recognizers, make it the delegate of the SWRevealController then paste in this method.
#pragma mark - SWRevealViewControllerDelegate
- (BOOL)revealControllerPanGestureShouldBegin:(SWRevealViewController *)revealController
{
float velocity = [revealController.panGestureRecognizer velocityInView:self.view].x;
if (velocity < 0 && self.revealViewController.frontViewPosition == FrontViewPositionLeft)
return NO;
else
return YES;
}