File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -38,17 +38,12 @@ - (CGFloat)completionSpeed
3838
3939- (void )handleGesture : (UIPanGestureRecognizer*)gestureRecognizer {
4040 CGPoint translation = [gestureRecognizer translationInView: gestureRecognizer.view.superview];
41+ CGPoint vel = [gestureRecognizer velocityInView: gestureRecognizer.view];
4142
4243 switch (gestureRecognizer.state ) {
4344 case UIGestureRecognizerStateBegan: {
4445
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 ;
50-
51- BOOL rightToLeftSwipe = translation.x < 0 ;
46+ BOOL rightToLeftSwipe = vel.x < 0 ;
5247
5348 // perform the required navigation operation ...
5449
You can’t perform that action at this time.
0 commit comments