Skip to content

Commit 81e1853

Browse files
committed
Adding better interaction with iOS 7's popGestureRecognizer
1 parent 8f73d58 commit 81e1853

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Library/DNSSwipeableCell.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,9 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecogni
329329
if ([gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]]) {
330330
UIPanGestureRecognizer *panGesture = (UIPanGestureRecognizer*)gestureRecognizer;
331331
CGPoint velocity = [panGesture velocityInView:self.myContentView];
332-
if (fabsf(velocity.x) > fabsf(velocity.y)) {
332+
if (velocity.x > 0) {
333+
return YES;
334+
} else if (fabsf(velocity.x) > fabsf(velocity.y)) {
333335
return NO;
334336
}
335337
}

0 commit comments

Comments
 (0)