title: UISplitViewController: Show detail view initially
body: <p>I have a <code>UISplitViewController</code>. The master view shows an overview of the app for navigation, and the detail view is what the user will interact with 99% of the time. When the app starts in a horizontally compact environment, it shows the master view, but I want it to show the detail view instead. The user can go back to the master if they want, but the app is actually fully functional without.</p>
  
  <p><strong>How can I get it to show the detail view on boot, instead of the master?</strong></p>
  
  <p>This should be reasonably simple, but I've tried a number of approaches and none are particularly satisfying.</p>
  
  <p><strong>Try 1</strong></p>
  
  <p>In my <code>UISplitViewControllerDelegate</code>:</p>
  
  <pre><code>func primaryViewControllerForCollapsingSplitViewController(_ splitViewController: UISplitViewController) -&gt; UIViewController?
  {
      return splitViewController.viewControllers.last
  }
  </code></pre>
  
  <p>This does indeed show the detail view on boot, but it's missing the navigation button that would take the user to the master view. Obviously that's because the detail view hasn't been pushed onto the stack; instead, it's replaced the master completely. I could of course fudge it by adding my own 'back' button - but that seems like a hack (right?).</p>
  
  <p><strong>Try 2</strong></p>
  
  <p>As soon as the app loads and the master is shown, immediately push the detail view using</p>
  
  <pre><code>splitViewController!.showDetailViewController(detailViewController, sender: self)
  </code></pre>
  
  <p>This will probably work, but it also seems a bit hacky. It's essentially getting the OS to do the wrong thing initially then quickly changing it before the user notices!</p>
  
  <p>So, is there a better way?</p>