Wie erstelle ich eine UIView-Bounce-Animation?

Ich habe folgende CATransition für ein UIView aufgerufenfinalScoreView, wodurch der Bildschirm von oben aufgerufen wird:

CATransition *animation = [CATransition animation];
animation.duration = 0.2;
animation.type = kCATransitionPush;
animation.subtype = kCATransitionFromBottom;
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];

[gameOver.layer addAnimation:animation forKey:@"changeTextTransition"];
[finalScoreView.layer addAnimation:animation forKey:@"changeTextTransition"];

Wie mache ich es so, dass es einmal abprallt, nachdem es herunterfällt, und dann still bleibt? Es sollte immer noch von oben in den Bildschirm eindringen, aber dann abprallen, wenn es herunterfällt.

Jede Hilfe wäre sehr dankbar, danke!

Antworten auf die Frage(4)

Ihre Antwort auf die Frage