title: iPhone 6+ state restoration with tab bar in master split view
body: <p>I have a problem with supporting state restoration in iPhone 6+.</p>
  
  <p>Here's my hierarchy:
  <img src="https://i.stack.imgur.com/DmCW0.jpg" alt="enter image description here"></p>
  
  <p>Problem is when state restoration happens in Portrait orientation and then, at later point, state decoding attempt is made while in Landscape orientation.</p>
  
  <p>Explanation:
  In portrait mode, there is only TabBar as master view (in fact, detail view doesn't exist) so it is pushed into TabBar navigation's controller.</p>
  
  <p>Then, at later point, when app tries to perform state restoration for landscape, my details view is pushed onto master navigation controller (when it should be in details).</p>
  
  <p>Due to custom hierarchy I have implemented UISplitViewControllerDelegate methods accordingly, and they work fine.
  UISplitViewControllerDelegate methods also make sure that state restoration works in following cases:</p>
  
  <pre><code>Landscape -&gt; Landscape
  Landscape -&gt; Portrait
   Portrait -&gt; Portrait
  </code></pre>
  
  <p>what's not working is: Portrait -> Landscape because, as I said, delegate method don't get called when in not-collapsed state so view hierarchy doesn't know how to split details from master view and embed that into detail navigation controller.</p>