ios - 下拉和反弹 Segue 动画

标签 ios uistoryboardsegue

我正在尝试复制在 Secret 中看到的以下 segue 动画,它在屏幕底部弹跳。我已经搜索了互联网,但找不到任何可以帮助我的东西。

enter image description here

我正在寻找从顶部下拉并在屏幕底部弹跳的 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/

相关文章:

ios - 如何在 Objective C Multipeer Connectivity 框架中传输 NSObject 数据

iphone - iOSscrollview.bounces 使应用程序在 iOS 4.x 上崩溃

IOS7 - performSegueWIthIdentifier 没有任何效果

iOS7 问题与自定义单元格选择模态视图 Controller segue

swift - 展开后 TableView 消失

ios - 如果条件为真,如何转移到特定的 Storyboard?

ios - 测试Xcode应用程序时,如何使iPhone连接到Mac上的本地Xampp服务器

ios - 具有动态大小的 Cell 的复杂 AutoLayout

ios - 从第二个 View Controller ios 将对象添加到我的基本 View Controller 中的 NSMutableArray

swift - 如何在一种情况下推送 View Controller ,但在另一种情况下以模态方式呈现它?