美文网首页
CABaseic 动画 来回跳 循环动画

CABaseic 动画 来回跳 循环动画

作者: seventhboy | 来源:发表于2017-06-08 16:34 被阅读30次
    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