【发布时间】:2017-03-31 21:13:35
【问题描述】:
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"progress"];
animation.duration = duration;
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
animation.fillMode = kCAFillModeForwards;
animation.fromValue = [NSNumber numberWithFloat:self.progress];
animation.toValue = [NSNumber numberWithFloat:pinnedProgress];
animation.beginTime = CACurrentMediaTime() + initialDelay;
animation.delegate = self;
[self.circularProgressLayer addAnimation:animation forKey:@"progress"];
但我在offical document 中找不到progress。键路径是否需要是可动画的属性? progress 是什么意思?
【问题讨论】:
-
我认为您可能误读了代码。
forKey:@"progress"正在“命名”动画。 -
我指的是
[CABasicAnimation animationWithKeyPath:@"progress"];中的progress -
糟糕!我的误读,不是你的!编辑前在屏幕外