最佳答案
我有一个叫做 finalScoreView
的 UIView 的计算机辅助转换器,可以让它从顶部进入屏幕:
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"];
我怎么才能让它落下后弹起来,然后保持不动呢?它仍然应该从顶部进入屏幕,但当它下来时反弹。
如有任何帮助,我将不胜感激,谢谢!