I would like to implement a UISplitViewController
that runs on iPad and iPhone. When running on iPhone I only want one view controller visible on screen at a time, so when the user taps on a cell in the master view controller it should push to reveal the detail view controller.
I have dragged out a UISplitViewController
in Interface Builder and have got it working great on iPad. When I tap a cell, it updates the detail view controller's information via a protocol. It simply calls the method on the delegate and passes in the appropriate information, and that delegate method just takes in the passed data and reloads the table. Because both are on screen at the same time it works great.
But when I run the app on iPhone, when I select a row, the methods are still obviously called but the detail view controller doesn't get pushed on screen. It seems as if nothing happens when you tap a cell.
I was under the impression this should occur automatically when using a split view controller on iPhone, but perhaps I need to do a little work to make it behave as expected.
What much I do to push the detail view controller onto the navigation stack when the user selects a row in the master view controller when running on iPhone?
Additionally, is it possible to make this compatible with iOS 7, or will I need to do it the old way on that OS - when the user selects the row, perform a push segue to reveal the second view controller?