title: UINavigationController application crashed with error msg: 'Popovers cannot be presented from a view which does not have a window.'
body: <p>In my navigation application, when step as follows, the app always crashed with error message "Popovers cannot be presented from a view which does not have a window"</p>
  
  <p>Step1: Tap a row in <code>RootViewController</code> will push to <code>detailsViewController</code>, tap button in detailsViewController to show a <code>popOverController</code>, it worked!</p>
  
  <p>Step2: Tap backButton will pop to <code>RootViewController</code>, do Step1 again, Crashed!</p>
  
  <p>Below code will print the window's description all right:</p>
  
  <pre><code>- (void)viewDidAppear:(BOOL)animated
  {
      [super viewDidAppear:animated];
      NSLog(@"%@", self.view.window);
  }
  </code></pre>
  
  <p>Button's action Step1 will print the window, Step2 will print nil:</p>
  
  <pre><code>- (void)btn_click:(id)sender {
      NSLog(@"%@", self.view.window);
      [self._popOver presentPopoverFromRect:[sender frame] inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
  }
  </code></pre>
  
  <p>So, what I was missing?</p>