1
votes

I have used Apple's example multiple detail views (using SubstitutableDetailViewController) to build an iPad app with multiple view controllers. So far all has gone to plan until I hit a hiccup.

The Apple guide I used as a template can be found here: http://developer.apple.com/library/ios/#samplecode/MultipleDetailViews/Introduction/Intro.html

The problem I am having is that my masterviewcontroller has a drill down. When I try to push a new view to the detail view controller from a drilled down menu it seems to work but my buttons on rotation don't behave correctly. Should I be duplicating all the UISplitViewController delegate methods in my master view's drilled down view controllers?

Thanks in advance,

Bren

1
I'm not clear on which buttons you're discussing...I only see the one that shows the master popover. Also, some details on what "don't behave correctly" means might help.Phillip Mills
Sorry for my lack of clarity. The problem is that while pushing views to the detail view controller while in the original master view controller works fine - I get the "Menu" button while in portrait. However, once I drill down into new tableviewcontrollers within the master view, when I push a new detail view controller the "Menu" button on the detail navigation bar is not appearing (when in portrait). Rotating the device fixes this. It appears my popovercontroller always seems to be nil in the drill downs.Bren Gunning

1 Answers

0
votes

On application launch (in portrait) your SplitViewController will call this delegate method

- (void)splitViewController:(UISplitViewController*)svc 
     willHideViewController:(UIViewController *)aViewController 
     withBarButtonItem:(UIBarButtonItem*)barButtonItem 
     forPopoverController:(UIPopoverController*) pc 

In the example you linked that method in masterViewController calls this:

    [detailViewController showRootPopoverButtonItem:rootPopoverButtonItem];

to add the button to the detail controller. You need to call the above line when you push a new detail controller to add in the button, otherwise it will be nil.