-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Labels
Description
Translation is often == (0,0), so it's not precise - cell sometimes not move.
The (0,0) problem is not apparent when velocityInView: is used instead of translationInView.
Current code:
CGPoint currentPoint = [recognizer translationInView:self.myContentView];
//Check what direction the swipe is moving by checking the translation
BOOL movingHorizontally = fabsf(self.panStartPoint.y) < fabsf(self.panStartPoint.x);
Fix:
CGPoint movePoint = [recognizer velocityInView:self.myContentView];
BOOL movingHorizontally = fabsf(movePoint.y) < fabsf(movePoint.x);