Rom*_*nok 1 iphone core-animation ios
将CABasicAnimation直接添加到图层时,UIViewAnimationOptionBeginFromCurrentState标志的等效值是多少?当我为同一个键添加另一个动画并使其从当前状态开始动画时,我想要覆盖当前动画.
例如,我正在使用以下代码向我的图层添加动画.
CABasicAnimation *moveAnimation = [CABasicAnimation animationWithKeyPath:@"position.y"];
moveAnimation.fromValue = [NSNumber numberWithInt:layer.position.y];
moveAnimation.toValue = [NSNumber numberWithInt:0];
moveAnimation.duration = BUBBLE_DEFAULT_ANIMATION_DURATION;
[layer addAnimation:moveAnimation forKey:key];
Run Code Online (Sandbox Code Playgroud)
任何帮助将完全赞赏.