Skip to content

Instantly share code, notes, and snippets.

@briandw
Last active Dec 18, 2015
Embed
What would you like to do?
rantlab post 1.3
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