标签:
CAKeyframeAnimation *shakeAnim = [CAKeyframeAnimation animation];
shakeAnim.keyPath = @"transform.translation.x";
shakeAnim.duration = 0.15;
CGFloat delta = 10;
shakeAnim.values = @[@0, @(-delta), @(delta), @0];
shakeAnim.repeatCount = 2;
[self.myView.layer addAnimation:shakeAnim forKey:nil];
标签:
原文地址:http://www.cnblogs.com/lifengfneg/p/4774055.html