diff --git a/ZFDragableModalTransition/ZFModalTransitionAnimator.m b/ZFDragableModalTransition/ZFModalTransitionAnimator.m index 28b85ae..3228cf4 100644 --- a/ZFDragableModalTransition/ZFModalTransitionAnimator.m +++ b/ZFDragableModalTransition/ZFModalTransitionAnimator.m @@ -529,7 +529,6 @@ - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event } if (self.state == UIGestureRecognizerStateFailed) return; - CGPoint velocity = [self velocityInView:self.view]; CGPoint nowPoint = [touches.anyObject locationInView:self.view]; CGPoint prevPoint = [touches.anyObject previousLocationInView:self.view]; @@ -542,7 +541,7 @@ - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event CGFloat topVerticalOffset = -self.scrollview.contentInset.top; - if ((fabs(velocity.x) < fabs(velocity.y)) && (nowPoint.y > prevPoint.y) && (self.scrollview.contentOffset.y <= topVerticalOffset)) { + if ((nowPoint.y > prevPoint.y) && (self.scrollview.contentOffset.y <= topVerticalOffset)) { self.isFail = @NO; } else if (self.scrollview.contentOffset.y >= topVerticalOffset) { self.state = UIGestureRecognizerStateFailed;