Reputation:
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" ?
Upvotes: 9
Views: 6353
Reputation: 4560
For anyone following this now, iOS 7 lets you animate both ways:
Set the segue to Push, then see code below for a push implementation.
https://github.com/Dzamir/OldStyleNavigationControllerAnimatedTransition
Upvotes: 3
Reputation: 6118
I found this question on SO which may helps you: Reversal of Custom Segue with Storyboarding
But this is probably not a perfect solution.
Upvotes: 0