Custom UIStoryboardSegue Push and Pop Animations

I have the following code in UIStoryBoardSegue to twist a push segment.

  (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 click the back buttons in the application, it slides back, not curls. Since this is a push, I need to output the current view controller instead of adding another segment.

How do I make a curl?

+8
ios uistoryboardsegue
source share
2 answers

For those who are following this now, iOS 7 allows you to animate both ways:

Set segue for Push, then see the code below to implement push.

https://github.com/Dzamir/OldStyleNavigationControllerAnimatedTransition

+3
source share

I found this question on SO that might help you: Reversing a user segment using storyboard

But this is probably not an ideal solution.

0
source share

All Articles