-
-
Save ydzheng/781b0dfcfef557969621 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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) { | |
completionBlock(); | |
} | |
}]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment