Skip to content

Instantly share code, notes, and snippets.

@almostintuitive
Last active August 29, 2015 14:05
Show Gist options
  • Save almostintuitive/0091c5e5d36aff914384 to your computer and use it in GitHub Desktop.
Save almostintuitive/0091c5e5d36aff914384 to your computer and use it in GitHub Desktop.
SwipeToPeepCell-1.m
if (gestureRecognizer.state == UIGestureRecognizerStateBegan) {
[self.delegate swipeableCellDidStartSwiping:self];
} else if (gestureRecognizer.state == UIGestureRecognizerStateChanged) {
[self.delegate swipeableCell:self didSwipeWithHorizontalPosition:touchLocation.x progress:progress];
} else if (gestureRecognizer.state == UIGestureRecognizerStateEnded) {
if (progress >= 0.7) {
[self.delegate swipeableCellCompletedSwiping:self];
} else {
[self.delegate swipeableCellCancelledSwiping:self];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment