Skip to content

Commit 9070b93

Browse files
Added a few comments
1 parent e44a985 commit 9070b93

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

InteractionControllers/CEHorizontalSwipeInteractionController.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ - (void)handleGesture:(UIPanGestureRecognizer*)gestureRecognizer {
4242
switch (gestureRecognizer.state) {
4343
case UIGestureRecognizerStateBegan: {
4444

45-
if (translation.x == 0) break;//if no horizontal translation returned, simply break and do nothing
45+
// if the user performs a *very* slow swipe, the initiatlly returned x translation may be zero. This means
46+
// that we cannot effectively determine which direction the swipe is, so we just
47+
// ignore this interaction.
48+
if (translation.x == 0)
49+
break;
4650

4751
BOOL rightToLeftSwipe = translation.x < 0;
4852

0 commit comments

Comments
 (0)