Last active
December 18, 2015 21:59
-
-
Save briandw/5851365 to your computer and use it in GitHub Desktop.
rantlab post 1.3
This file contains hidden or 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
CGPathRef endPath = [RLArrowView createPathWithArrowFromPoint:middle | |
toPoint:target | |
tailWidth:2.0 | |
headWidth:10.0 | |
headLength:20.0 | |
wiggle:0]; | |
[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context){ | |
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"path"]; | |
animation.duration = 0.15; | |
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]; | |
animation.repeatCount = 0; | |
animation.autoreverses = NO; | |
animation.fromValue = (__bridge id)startPath; | |
animation.toValue = (__bridge id)endPath; | |
[arrow addAnimation:animation forKey:@"animatePath"]; | |
arrow.path = endPath; | |
} completionHandler:^{ | |
[self wiggleFromPath:endPath target:target amount:1.0]; | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment