title: iPad: how to close UIPopoverController from within the "popped" ViewController
body: <p>I'm converting and iphone project to ipad. On iphone I have a mainViewController that opens a loginViewController using <code>addSubView</code>.</p>
  
  <p>On the iPad I would like to display that loginViewController in a popover. so I did something like:</p>
  
  <pre><code>UIPopoverController *loginPop = [[UIPopoverController alloc] initWithContentViewController:loginViewController];
  [loginPop presentPopoverFromRect:CGRectMake(150, 150, 90, 90) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:true];
  </code></pre>
  
  <p>This works fine. The problem is when the loginViewController finishes its "business". On the iPhone I just call a simple <code>[self.view removeFromSuperview];</code> But on the ipad this causes the view to be removed from the PopoverController but the frame of the popup stays.</p>
  
  <p>So my question is: is there any simple way from within the loginViewController to remove its PopoverController container (without using delegate or notifications)?</p>