Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
- (void)animateLockWithGestureRecognizer:(UIPanGestureRecognizer *)gr completion:(void (^)(void))completionBlock {
[self removeGestureRecognizer:gr];
//calculate animationDuration based on gr position and velocity
[UIView animateWithDuration:animationDuration animations:^{
//some calculation logic to determine a view’s location
[self updateSliderColor:offset];
} completion:^(BOOL finished) {
if (completionBlock) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment