CATransaction completion wird sofort aufgerufen

Ich versuche einen Completion-Block auszuführen, nachdem meine CAAnimation beendet wurde. Es scheint jedoch, dass der Animationsblock aufgerufen wird, bevor meine Animation abgeschlossen ist. Die Animation läuft trotzdem korrekt ab.

[CATransaction begin];
[self.view.layer addAnimation:self.dropAndBounceAnimation forKey:@"appearance"];
[CATransaction setCompletionBlock:completionBlock];
[CATransaction commit];

Die dropAndBounceAnimation ist eine CAKeyFrameAnimation auf position.y mit einer festen Dauer.

Antworten auf die Frage(4)

Ihre Antwort auf die Frage