2
votes

I am trying to set up a UISplitViewController in a Storyboard with the detail going to a UITabBarController which then goes to a UINavigationController wrapping my first ViewController.

The problem I am having is getting the UIBarButtonItem to show up in the Navigation Item when the device is in the portrait orientation. Should the UITabBarController be the delegate for the UISplitViewController and send delegate message to every child view controller to have them create the bar button item and popover?

2

2 Answers

2
votes

I found need for this same solution. I am using it in one of my prototype applications for home-control.

The problem you cite is only the first of a couple of problems you'll run into. I believe i have full the solution now working for both iPad/iPhone (Universal app).

You can read my post here: problem and solution description with sample code at my blog

In summary, you'll run into the following issues (most for iPad imple., some for iPhone imple. when building Universal app.):

  • The template code in appDelegate sets up delegate incorrectly for the new shape (it really no-longer understands what type of controller is present for the detail view
  • UISplitViewController delegate calls are not propagated thru the UITabbarController to the tabs correctly
  • You will need to decide how/when to notify the tab(s) of the current detail selection
  • When building as Universal App some of the notification now need to happen in prepareForSegue: methods (as some of the other notifications don't happen on the iPhone platform.)

(All of this is shown at my blog post)

0
votes

You can find example and theory in this site. Very good example.