1

I'm working on an iPad app that uses a UISplitView. Inspired by http://blog.blackwhale.at/2010/04/your-first-ipad-split-view-application/, I display a button in my detail view when in portrait mode that shows the popover controller. This works great. However, the appropriate UISplitViewControllerDelegate message is only sent when the device rotates. So, when the app first loads (in portrait mode), my navigation button is not visible.

Is it possible to somehow convince the UISplitViewController to send that message on load or something, or do I need to re-implement my own popover logic to get things working?

Thanks,

-Patrick

Patrick Linskey
  • 1,124
  • 1
  • 13
  • 24
  • FTR, I've gotten things functional by creating a navigation-aware subclass of UISplitViewController that does the right thing on initial load. – Patrick Linskey May 02 '10 at 23:04
  • how have you done this? I have the same issue.. I want to display the button in portrait mode when the app starts in portrait mode.. Thanks for the help! – wouter88 Jun 13 '10 at 08:34

3 Answers3

6

We had the exact same issue and it turned out that this thread had the right clues. When comparing our app with the SplitView template, we noticed that the split template does exactly what was mentioned here: set the UISplitViewController as the root view controller in application:didFInishLaunchingWithOptions.

Out previous solution linked the split view controller in the XIB directly to the window. While this works it seems the split view has difficulties getting the startup orientation and the missing button occurs. When we removed the link in the XIB and created it in code in the app delegate, everything ran fine.

Dennis Bliefernicht
  • 5,147
  • 1
  • 28
  • 24
0

That's weird. Maybe you missed something. Take a look at the template based on a splitController. It works fine form very startup no matter in what mode the app was loaded.

Jim75
  • 737
  • 8
  • 13
0

did you make sure that your UISplitViewController's view is the only subview of your UIWindow, and that you added it inside the application:didFinishLaunchingWithOptions: method of your app delegate

user102008
  • 30,736
  • 10
  • 83
  • 104