In this case, You've to add gesture to your view and you can cancel gesture call back method by doing if touch happen on tableview as below.
1) set TAG to your tableview . self.tableView.tag = TAG
;
2) Now cancel gesture if touch on tableview as below
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
id touchView= touch.view;
if ([touchView isKindOfClass:[UITableView class]] || [touchView isKindOfClass:[UITableViewCell class]] )
{
if ( ((UIView*)touchView).tag == TAG)
return NO;
}
return YES;
}