Search code examples
iosxcodeuisplitviewcontrollerios5storyboard

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?


Solution

  • 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.