I have a splitview-based app, that has a popover menu containing 3 views. I would like to add another view, that doesn't appear in the popover menu, and is displayed when a different button is clicked.
Here is a screenshot, with the popover menu, and the 'Log' button which I want to use to display my new view.
All of the other views are configured something like this:
UIViewController <SubstitutableDetailViewController> *detailViewController = nil;
if (row == 0) {
FirstDetailViewController *newDetailViewController = [[FirstDetailViewController alloc] initWithNibName:@"FirstDetailView" bundle:nil];
detailViewController = newDetailViewController;
}
...
NSArray *viewControllers = [[NSArray alloc] initWithObjects:self.navigationController, detailViewController, nil];
splitViewController.viewControllers = viewControllers;
[viewControllers release];
I tried to replicate this code for my new view:
-(void)displayLogView{
UIViewController <SubstitutableDetailViewController> *detailViewController = nil;
LogDetailViewController *newDetailViewController = [[LogDetailViewController alloc] initWithNibName:@"LogDetailViewController" bundle:nil];
detailViewController = newDetailViewController;
// Update the split view controller's view controllers array.
NSArray *viewControllers = [[NSArray alloc] initWithObjects:self.navigationController, detailViewController, nil];
splitViewController.viewControllers = viewControllers;
[viewControllers release];
[detailViewController release];
}
But nothing happens. I think that I am missing the code to actually display the view. I tried to find how the other views were displayed, but could not find anything (I got the code from the apple sample code).
Any help would be appreciated!