如何在ViewControllers之间改变segue的速度

Tea*_*App 3 objective-c ios uistoryboard segue

是否可以控制segue速度?

我已经检查了文档,但Apple没有给出任何方法.

但我更多的是寻找破解和改变低级代码的想法,以便在慢动作中进行猜测.

Fee*_*ics 5

下面的代码是自定义segue,您可以在代码中设置转换的持续时间.

- (void)perform 
{
    UIViewController *src = (UIViewController *) self.sourceViewController;
    UIViewController *dst = (UIViewController *) self.destinationViewController;
    [UIView transitionFromView:src.view
                        toView:dst.view
                      duration:3.0
                       options:UIViewAnimationOptionTransitionFlipFromLeft
                    completion:NULL];

}
Run Code Online (Sandbox Code Playgroud)

示例项目在GitHub中:https://github.com/weed/p120805_CustomSegue

您可以下载并运行它.我希望这对你有所帮助.