CABaseic 动画 来回跳 循环动画

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"];

你可能感兴趣的:(CABaseic 动画 来回跳 循环动画)