核心动画: 登录按钮的抖动效果:

CAKeyframeAnimation * kfAnimation = [CAKeyframeAnimation animationWithKeyPath:@"transform.translation.x"];
kfAnimation.values = @[@-,@,@,@];
kfAnimation.repeatCount = ;
kfAnimation.duration = 0.2;
[loginButton.layer addAnimation:kfAnimation forKey:nil];
05-08 08:06