Ein Code-Schnipsel aus https://github.com/danielamitay/DACircularProgress/blob/master/DACircularProgress/DACircularProgressView.mWelche Bedeutung hat der Fortschrittsschlüsselpfad in CABasicAnimation?
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"];
Aber ich nicht progress
im offical document finden konnte. Muss der Schlüsselpfad eine animierbare Eigenschaft sein? Was bedeutet die progress
?
Ich glaube, Sie könnten den Code falsch interpretiert haben. Der 'forKey: @" Fortschritt "' benennt die Animation. –
Ich meine die 'progress' in' [CABasicAnimation animationWithKeyPath: @ "Fortschritt"]; ' – Jichao
Ups! Mein falsches Lesen, nicht deins! War vor der Bearbeitung offline –