Note that there are some explanatory texts on larger screens.

plurals
  1. POUIPopoverController automatically resizing to max height on pushViewController
    text
    copied!<p>I have a popover containing a UINavigationController. I can display the popover fine, and it contains the navController just fine. The navController contains a tableView and when I select an item it creates a new detail view:</p> <pre><code> DeviceDetailViewController *detailViewController = [[[DeviceDetailViewController alloc] initWithNibName:@"DeviceDetailViewController" bundle:nil] autorelease]; </code></pre> <p>I then push it the new view controller:</p> <pre><code> [self.navigationController pushViewController:detailViewController animated:YES]; </code></pre> <p><strong>This is when the problem occurs:</strong> <em>after</em> pushing the new view the popover resizes to the maximum height available on the iPad.</p> <p>I have tried setting the height of all the views in the xib to fixed height rather than flexible. I have tried explicitly setting the height of the popover. I have also tried using different view controllers as the child view. The problem remains: the popover <strong>wants</strong> to resize itself to max height automatically whenever a new view is pushed to the navigation controller.</p> <p>Here's a <a href="https://stackoverflow.com/questions/2926308/uipopovercontroller-w-uinavigationcontroller-subview-contentsizeforviewinpopover">question</a> which discusses trying to deliberately control the size of the popover when pushing new views:</p> <p>I thought this might be a brute force method to control the size. Strangely enough, though, it actually causes some quick graphics quirks (as if the view were being freshly animated in) followed by continuing to resize as described above.</p> <p>In other words, something is literally forcing the popover to its maximum height, and it seems to occur <em>after</em> all delegate methods have been called.</p> <p>Is it the navigation controller? Has anyone seen this kind of thing?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload