Advertisement
Guest User

Untitled

a guest
Jan 12th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. CAKeyframeAnimation *animation = [CAKeyframeAnimation animation];
  2. animation.keyPath = @"position.x";
  3. animation.values = @[ @0, @10, @-10, @10, @-10, @10, @0 ];
  4. animation.keyTimes = @[ @0, @(1 / 6.0), @(2 / 6.0), @(3 / 6.0), @(4 / 6.0), @(5 / 6.0), @1 ];
  5. animation.duration = 0.4;
  6.  
  7. animation.additive = YES;
  8.  
  9. [_buttonTest.layer addAnimation:animation forKey:@"shake"];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement