CABaseic 动画 来回跳 循环动画
2017-06-08 本文已影响30人
seventhboy
CABasicAnimation *moveAnimation = [CABasicAnimation animationWithKeyPath:@"transform.translation.y"];
moveAnimation.autoreverses = YES;
moveAnimation.repeatCount = MAXFLOAT;
moveAnimation.toValue = [NSNumber numberWithFloat:Scale(20)];
moveAnimation.duration = 0.5;
moveAnimation.removedOnCompletion = NO;
moveAnimation.fillMode = kCAFillModeForwards;
[_numberLabel.layer addAnimation:moveAnimation forKey:@"moveAnimation"];