CALayer непрозрачность анимации не сработала - PullRequest
0 голосов
/ 04 сентября 2018

Посмотрите на код ниже. Это простая анимация, но когда я установил beginTime = AVCoreAnimationBeginTimeAtZero, анимация не работала правильно, в противном случае все в порядке.

CABasicAnimation *animation = [CABasicAnimation 
animationWithKeyPath:@"opacity"];
animation.duration = 2.f;
// animation.beginTime = AVCoreAnimationBeginTimeAtZero;
animation.removedOnCompletion = NO;
animation.fillMode = kCAFillModeForwards;
animation.fromValue = [NSNumber numberWithFloat:1.0];
animation.toValue = [NSNumber numberWithFloat:0];
animation.delegate = self;
[layer addAnimation:animation forKey:@"basicAnimation"];
...