title: Set UIPopOverController size
body: <p>I have a <code>view</code> with a bunch of button in a <code>UIScrollView</code>.  When the user presses a button, I want a UIPopOverController to display pointing at the selected button.  It kind of works, but the popover is the wrong size and points to a random point in the view.  Here is my code.</p>
  
  <pre><code>-(void)detail:(id)sender{
      UIButton *button = sender;
      NSLog(@"tag = %i", button.tag);
  
      UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController];
      if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
      self.popover = [[UIPopoverController alloc] initWithContentViewController:navController];
      self.popover.delegate = self;
      [self.popover presentPopoverFromRect:button.bounds inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
  }
  </code></pre>
  
  <p>Than the problem with the size of the popover:
  In the view that is inside the popover, I have:</p>
  
  <pre><code>self.contentSizeForViewInPopover = scroll.contentSize;
  NSLog(@"%f, %f", scroll.contentSize.height, scroll.contentSize.width);
  NSLog(@"showing: %f, %f",  self.contentSizeForViewInPopover.height,  self.contentSizeForViewInPopover.width);
  </code></pre>
  
  <p>and both logs are matching.  So I think everything should work correctly.  But it doesn't.  Here is a screen shot.  Let me know if you need more of my code.  Thanks in advance.</p>
  
  <p><img src="https://i.stack.imgur.com/GRfkv.png" alt="screen shot of the error"></p>