title: Error "Attempt to present xViewController on yViewController whose view is not in the window hierarchy!" iOS8
body: <p>I have a view controller <code>yViewController</code>. I am adding it to the <code>rootViewController</code> as follows:</p>
  
  <pre><code>[self.window.rootViewController.view addSubView:yViewController.view]
  </code></pre>
  
  <p>I have a outlet <code>UIButton</code> on <code>yViewController</code> and on touch i am displaying a <code>xViewCOntroller</code> in a <code>UIPopOverController</code> using the following code to present it:</p>
  
  <pre><code>[popOver presentPopOverFromRect:button.frame inView:self.buttonContainerView permittedArrowDirections:UIPopOverArrowDirectionAny animated:NO]
  </code></pre>
  
  <p>It worked fine on iOS 7 however I am having the error on iOS 8:</p>
  
  <pre><code>Attempt to present xViewController on yViewController whose view is not in the window hierarchy!
  </code></pre>
  
  <p>Any advice?</p>