title: Can UIPopoverPresentationController be forced to reposition popover instead of resizing it?
body: <p>I am using auto layout with Storyboard. I present a popoverPresentationController from a cell rect:</p>
  
  <pre><code>NumberController * viewController = [self.storyboard instantiateViewControllerWithIdentifier:@"NumberController"];
  UIPopoverPresentationController *pc = [viewController popoverPresentationController];
      pc.delegate = self;
      pc.permittedArrowDirections = UIPopoverArrowDirectionAny;
      pc.sourceView = tableView;
      pc.sourceRect = [tableView rectForRowAtIndexPath:indexPath];
      [self.navigationController presentViewController:viewController animated:animated completion:nil];
  </code></pre>
  
  <p>The popover presents on an iPad in portrait mode with the arrow up.</p>
  
  <p>I rotate the iPad to landscape mode. The popoverPresentationController keeps the same sourceView/sourceRect and properly points to the cell. It also keeps the up arrow.</p>
  
  <p>But it is now at the bottom of the view, so the popover resizes to a shorter height. This is not desired behavior.</p>
  
  <p>If the popover were simply to move to a new position and change the arrow direction, it would not need to resize at all. This is the desired behavior.</p>
  
  <p>I thought the following method might permit me to make changes, but it is not called since the sourceView rect does not change:</p>
  
  <pre><code>- (void)popoverController:(UIPopoverController *)popoverController
  willRepositionPopoverToRect:(inout CGRect *)rect
                     inView:(inout UIView **)view {
  
  }
  </code></pre>
  
  <p>I have tried to reset the permittedArrowDirections (in preferredContentSize, because this seemed like the most logical place). This does not work (the popover still resizes):</p>
  
  <pre><code>- (CGSize) preferredContentSize {
      [super preferredContentSize];
      self.popoverPresentationController.permittedArrowDirections = UIPopoverArrowDirectionUnknown;
      return CGSizeMake(DEFAULT_POPOVER_WIDTH,DEFAULT_POPOVER_HEIGHT);
  }
  </code></pre>
  
  <p>I simply cannot find a way to force the popoverPresentationController to change arrow direction and reposition the popover instead of resizing the popover. I am beginning to think it is not even possible - but I still hold out hope that I am just missing something.</p>
  
  <p>EDIT: In the meantime, it has occurred to me that maybe a popover is not the best way to present this view if I don't want it resized in iPad. I am going to try it with UIModalPresentationFormSheet presentation. But I would still like to find an answer to this question.</p>