我正在尝试复制在 Secret 中看到的以下 segue 动画,它在屏幕底部弹跳。我已经搜索了互联网,但找不到任何可以帮助我的东西。
我正在寻找从顶部下拉并在屏幕底部弹跳的 segue 动画。
目前我有这个,但它不会反弹。
- (void)perform {
UIViewController *srcViewController = (UIViewController *) self.sourceViewController;
UIViewController *destViewController = (UIViewController *) self.destinationViewController;
CATransition *transition = [CATransition animation];
transition.duration = 0.4;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionMoveIn;
transition.subtype = kCATransitionFromBottom;
[srcViewController.view.window.layer addAnimation:transition forKey:nil];
[srcViewController presentViewController:destViewController animated:NO completion:nil];
}
如果有帮助,我会使用 POP 动画引擎。
最佳答案
您需要使用 UIKit Dynamics 进行自定义过渡来执行动画。
关于ios - 下拉和反弹 Segue 动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27488654/