Skip to content

Instantly share code, notes, and snippets.

@briandw
Last active December 18, 2015 21:59
Show Gist options
  • Save briandw/5851365 to your computer and use it in GitHub Desktop.
Save briandw/5851365 to your computer and use it in GitHub Desktop.
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