lnafziger
lnafziger

Reputation: 25740

In an iOS 5 Storyboard with a Split View Controller, how do you push a new View Controller to the Master and Detail from the same control?

When I click a control, I want it to push a new view controller to both the Master Split and the Detail Split.

Unfortunately, in the Storyboard editor, when you control drag from an object and create a segue to a View Controller, it overwrites the original value of the Push Storyboard Segue field.

Is it possible to accomplish my goal in the storyboard file, or does it have to be done in code?

Upvotes: 2

Views: 3593

Answers (2)

Eedoh
Eedoh

Reputation: 6268

I think it would be much nicer and cleaner if you would just Control+drag, but don't leave the segue with a default, "Push" style. Notice that there is also "Replace" style available for segues here. When you choose "Replace" style, there will be "Destination" parameter available. Choose whether you want to replace a view in Master, or Details controller, and that's it.

Upvotes: 0

Chris Parker
Chris Parker

Reputation: 1252

You'll probably have to override -[UIViewController prepareForSegue:sender:] and do the extra push yourself; storyboards are designed to manage the navigation flow for a single view controller at a time.

Upvotes: 2

Related Questions