JDSideMenu
JDSideMenu copied to clipboard
Tableview cells hard to click
When I create a simple uitableviewcontroller accessed through the menu option like this:
SettingsViewController *settings = [[SettingsViewController alloc] init];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:settings];
[self.sideMenuController setContentController:nav animated:YES];
The cells of it become very hard to click. One tap does nothing. If tap and hold for while it become selected and holding a little more and just after releasing it calls the didSelectRowAtIndexPath for the selected cell. Normally just a tap selects the cell and calls the delegate.
If I call this view from another view, i.e. using
[self presentViewController:settings animated:YES completion:nil];
Its behaviour becomes normal again. I believe it's something with the setContentController of your library. Can you help me? Thank you.
I discovered how to solve this. In JDSideMenu.m, line 65, change to:
if (self.tapGestureEnabled) {
self.tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapRecognized:)];
[self.containerView addGestureRecognizer:self.tapRecognizer];
}
if (self.panGestureEnabled) {
self.panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panRecognized:)];
[self.containerView addGestureRecognizer:self.panRecognizer];
}
The problem was because of the tap gesture that was added to the view, even though I had set it to NO.
feel free to send a PR! thank you.