Have you tried to see the state of your UILongPressGestureRecognizer before [tableView reloadData] ? For instance:
// Returns |YES| if a gesture recognizer began detecting a long tap gesture - (BOOL)longTapPossible { BOOL possible = NO; UIGestureRecognizer *gestureRecognizer = nil; NSArray *visibleIndexPaths = [tableView indexPathsForVisibleRows]; for (NSIndexPath *indexPath in visibleIndexPaths) { // I suppose you have only one UILongPressGestureRecognizer per cell gestureRecognizer = [[tableView cellForRowAtIndexPath:indexPath] gestureRecognizers] lastObject]; possible = (gestureRecognizer.state == UIGestureRecognizerStateBegan || gestureRecognizer.state == UIGestureRecognizerStateChanged); if (possible) { break; } } return possible; } // ... later, where you reload the tableView: if ([self longTapPossible] == NO) { [tableView reloadData]; }
Let me know if this works!
source share