title: Adding Button to Show Master View from Detail View
body: <p>I am trying to add a button to my navigation bar on my detail view to show the master view when in portrait mode but the button isn't showing up.  Can anyone help or offer suggestions?</p>
  
  <p>Here is how I was trying to do it in the detail view:</p>
  
  <pre><code>- (void)splitViewController:(UISplitViewController *)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)pc
  {
      mainMenu = barButtonItem;
      [mainMenu setTitle:@"Menu"];
      [[self navigationItem]setLeftBarButtonItem:mainMenu];
  }
  
  - (void)splitViewController:(UISplitViewController *)svc willShowViewController:(UIViewController *)aViewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem
  {
      if (mainMenu == [[self navigationItem]leftBarButtonItem])
      {
          [[self navigationItem]setLeftBarButtonItem:nil];
      }
  }
  </code></pre>
  
  <p>Here is how I'm loading the detail view when selecting a row in my master view:</p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  { 
      NSMutableArray *details = [self.splitViewController.viewControllers mutableCopy];
  
      UINavigationController *detailNav = [[UINavigationController alloc]initWithRootViewController:webViewController];
  
      [details replaceObjectAtIndex:1 withObject:detailNav];
  
      self.splitViewController.viewControllers = details;
  
      KFBAppDelegate *appDelegate = (KFBAppDelegate *)[[UIApplication sharedApplication]delegate];
      appDelegate.window.rootViewController = self.splitViewController;
  </code></pre>
  
  <p>I've added this to viewDidLoad and the button shows up now but I'm not sure how to get it to show the master view.</p>
  
  <pre><code>mainMenu = [[UIBarButtonItem alloc]init];
      [mainMenu setTitle:@"Menu"];
  self.navigationItem.leftBarButtonItem = mainMenu;
  </code></pre>
  
  <p>Here is a picture of what it looks like when I swipe from the left to show the master view.</p>
  
  <p><img src="https://i.stack.imgur.com/WuxmG.jpg" alt="enter image description here"></p>
  
  <p>I've managed to get a left button to appear but now I don't know how to have it open the master view.  Here is how I got the button to show up:</p>
  
  <pre><code>mainMenu = [[UIBarButtonItem alloc]init];
      [mainMenu setTitle:@"Menu"];
  self.navigationItem.leftBarButtonItem = mainMenu;
  </code></pre>