Reputation: 2600
I know how to code a custom segue, which would go from left to right (while the normal push segue is from right to left). But as you may know, iOS7 push segue is different than pre-ios7: indeed, the incoming view controller actually floats in over the top of the previous one, which only moves a small distance out of the way.
I want to do exactly the same, but reverse. Do I have to create a custom segue?
The reverse segue must be available somewhere, since it is triggered by the "Back" button on my navigationController
?
All in all, I would like a transition between ViewControllers
in a NavigationController
, like the default push transition, but reverse.
Can somebody help me? Thanks a lot
Upvotes: 4
Views: 3641
Reputation: 59
You can try this trick https://github.com/bezumkin/LeftToRightSegue
For example, we have two windows: Main and Info. And we want to segue Info window from left to right.
The main idea is to use the standard show segue and his invisible activate when opening the Info window. So we moving to Main window and can use unwind segue from left by taping the button "i".
See in action http://www.youtube.com/watch?v=Hs_CDUJGWcM
Upvotes: 1
Reputation: 1045
You need to use custom View Controller transitions for this. There is an excellent WWDC 2013 Video & Sample Code for this. Check out Session 218 'Custom Transitions Using View Controllers'
This is also an excellent blog post to get you started - http://www.shinobicontrols.com/blog/posts/2013/10/03/ios7-day-by-day-day-10-custom-uiviewcontroller-transitions/
Upvotes: 1