Skip to content

Commit 6ff1c6f

Browse files
author
David Redenbaugh
committed
fix long press outside of cell -- taken from pull request
lukescott#54 originally implemented in: pbernery@4c95c4b
1 parent c79896e commit 6ff1c6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DraggableCollectionView/Helpers/LSCollectionViewHelper.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ - (void)handleLongPressGesture:(UILongPressGestureRecognizer *)sender
220220

221221
_hasShouldAlterTranslationDelegateMethod = [self.collectionView.dataSource respondsToSelector:@selector(collectionView:alterTranslation:)];
222222

223-
NSIndexPath *indexPath = [self indexPathForItemClosestToPoint:[sender locationInView:self.collectionView]];
224-
223+
NSIndexPath *indexPath = [self.collectionView indexPathForItemAtPoint:[sender locationInView:self.collectionView]];
224+
225225
switch (sender.state) {
226226
case UIGestureRecognizerStateBegan: {
227227
if (indexPath == nil) {

0 commit comments

Comments
 (0)