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:
DeviceDetailViewController *detailViewController =
[[[DeviceDetailViewController alloc] initWithNibName:@"DeviceDetailViewController" bundle:nil] autorelease];
I then push it the new view controller:
[self.navigationController pushViewController:detailViewController animated:YES];
This is when the problem occurs: after pushing the new view the popover resizes to the maximum height available on the iPad.
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 wants to resize itself to max height automatically whenever a new view is pushed to the navigation controller.
Here's a question which discusses trying to deliberately control the size of the popover when pushing new views:
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.
In other words, something is literally forcing the popover to its maximum height, and it seems to occur after all delegate methods have been called.
Is it the navigation controller? Has anyone seen this kind of thing?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…