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 动画 来回跳 循环动画
本文链接:https://www.haomeiwen.com/subject/svrtqxtx.html
网友评论