Skip to content

Commit 705b98d

Browse files
committed
Merge pull request lxcid#68 from timfether/master
Fixed bug of extraneous cells on rapid tapping.
2 parents 1d91462 + 9558dd7 commit 705b98d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

LXReorderableCollectionViewFlowLayout/LXReorderableCollectionViewFlowLayout.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ - (void)handleLongPressGesture:(UILongPressGestureRecognizer *)gestureRecognizer
347347

348348
UICollectionViewLayoutAttributes *layoutAttributes = [self layoutAttributesForItemAtIndexPath:currentIndexPath];
349349

350+
self.longPressGestureRecognizer.enabled = NO;
351+
350352
__weak typeof(self) weakSelf = self;
351353
[UIView
352354
animateWithDuration:0.3
@@ -360,6 +362,9 @@ - (void)handleLongPressGesture:(UILongPressGestureRecognizer *)gestureRecognizer
360362
}
361363
}
362364
completion:^(BOOL finished) {
365+
366+
self.longPressGestureRecognizer.enabled = YES;
367+
363368
__strong typeof(self) strongSelf = weakSelf;
364369
if (strongSelf) {
365370
[strongSelf.currentView removeFromSuperview];

0 commit comments

Comments
 (0)