Reputation: 509
I've set up some swipe gesture recognizers in the storyboard to move between view controllers. There are 4 view controllers, swipe left in 1 to go to 2, swipe left in 2 to go to 3 or swipe right in 2 to go back to one, etc. Everything functions just fine, but when I swipe right in one of the views to go back to the previous one, the view transitions in from right side of the screen instead of from the left. When swiping left to move through the pages it looks fine and completely natural, but when swiping right I'd like to be able to tell it which direction the new view controller should transition in from. I don't see any way to do this with the storyboarding and am not sure how I would do it programatically.
Upvotes: 0
Views: 473
Reputation: 104082
If you are doing transitions using segues, then the right swipe needs to be connected to an unwind segue. You shouldn't use a push to go "backwards" in the sequence of controllers.
Upvotes: 1