從https://github.com/danielamitay/DACircularProgress/blob/master/DACircularProgress/DACircularProgressView.mCABasicAnimation中進度keypath的含義是什麼?
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 documentprogress
。 keypath需要是動畫屬性嗎? progress
是什麼意思?
我想你可能看錯了代碼屬性。 'forKey:@「progress」'是「命名」動畫。 –
我的意思是''進度''[CABasicAnimation animationWithKeyPath:@「progress」];' – Jichao
糟糕!我的誤讀,不是你的!在編輯之前離開屏幕 –