Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CAKeyframeAnimation *animation = [CAKeyframeAnimation animation];
- animation.keyPath = @"position.x";
- animation.values = @[ @0, @10, @-10, @10, @-10, @10, @0 ];
- animation.keyTimes = @[ @0, @(1 / 6.0), @(2 / 6.0), @(3 / 6.0), @(4 / 6.0), @(5 / 6.0), @1 ];
- animation.duration = 0.4;
- animation.additive = YES;
- [_buttonTest.layer addAnimation:animation forKey:@"shake"];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement