I have a UITabBarController inside a UIPopoverController, which I am displaying solely from one UIBarButtonItem. When shown I want the popover to take up the maximum vertical height allowed. It works fine if I tap to display it, then dismiss, and then rotate. However if I have the popover displayed in landscape, and then rotate to portrait, it no longer will fill the entire vertical distance. I have the tab bar controller’s content size property set to 320 by 1000, and I have even tried resetting this every time the device rotates. Worse yet, when the user activates the search bar the popover shrinks up extremely small, and stays that way until the app is restarted.
http://cl.ly/3JdC to http://cl.ly/3JdC
Also http://cl.ly/3JVF
How can I stop this, and have the popover always fill up the max vertical size?
I was just having the same problem and found out that it only happens when I present the
UIPopoverControllerusing the method:but it works fine when I use:
Unfortunately
UIBarButtonItemdoes not have a frame Rect you can use with this last method so my fix was to use theUIToolbar‘s frame and modifyframe.origin.xandframe.size.widthaccordingly to make the popover appear on the right place next to the UIBarButtonItem.Hopefully Apple will fix this in next releases of iOS.
Regards