Take the 2-minute tour ×

I need to create two Segue's from the same button, and then I want to programatically choice which one to use based on device orientation. The problem I'm having is that you can only seem to create one segue from a button to another view so when I add the second one it just changes the first.

How do you add a segue that either isn't linked to a button etc so I can do programatically or how are you supposed to do this. I want to have two views that get dynamically picked based on orientation rather than moving the objects based via code when rotated as there is alot of objects and custom stuff that would make it much simplier just to have two views.

share|improve this question

2 Answers 2

up vote 9 down vote accepted

You'd have to trigger the segue manually. Hook up the button to a method, then make two segues, one from each view controller to the other in your storyboard, then give it an identifier in IB, then in your method you can call "performSegueWithIdentifier:".

Additional Info

To make a manual segue, control-click from the view controller object in IB to another view controller and the box will pop up as "Manual Segue". Just make sure it has an identifier.

share|improve this answer

I would think you could have the button trigger an IBAction wherein you could make a choice based on orientation and then trigger the appropriate segue programmatically.

share|improve this answer
I got that far my problem is how to create the segue to begin with –  James Krawczyk Oct 4 '12 at 0:11

Your Answer


