9

I have the following code in a UIStoryBoardSegue to do a curl-up push segue.

 (void) perform {

    UIViewController *src = (UIViewController *) self.sourceViewController;
    UIViewController *dst = (UIViewController *) self.destinationViewController;

    [UIView transitionWithView:src.navigationController.view duration:1
                       options:UIViewAnimationOptionCurveEaseInOut | UIViewAnimationOptionTransitionCurlUp
                    animations:^{
                        [src.navigationController pushViewController:dst animated:NO];
                    }
                    completion:NULL];

}

It works fine, but when I tap on the "back" buttons on the app, it slides backwards instead of curling down. Because this is a push, I need to pop the current view controller instead of adding another segue.

How do I do a "curl-down pop segue" ?

4

2 回答 2

3

对于现在关注此内容的任何人,iOS 7 允许您以两种方式制作动画:

将 segue 设置为 Push,然后查看下面的代码以了解推送实现。

https://github.com/Dzamir/OldStyleNavigationControllerAnimatedTransition

于 2013-10-03T05:03:02.210 回答
0

我在 SO 上发现了这个问题,这可能会对您有所帮助:Reversal of Custom Segue with Storyboard

但这可能不是一个完美的解决方案。

于 2012-07-27T22:42:43.447 回答