Max popover size

Can anyone confirm the maximum size of popoverview?

thanks

+4
source share
3 answers

From the documentation for setPopoverContentSize: ::

When resizing popovers content, the specified width must be at least 320 pixels and at most 600 pixels. There are no restrictions on the height value. However, the width and height you specify can be adjusted so that the pop-up window appears on the screen and is not covered by the keyboard.

+6
source

I found 585 seems to be maximal, any larger, and the whole thing wanders to the left with every resize.

+3
source

I just confirmed that this code works on iPad 1 and iPad 4 (this means that it is supported in iOS 5.1.1 - 6.1.2)

 popover = [[UIPopoverController alloc] initWithContentViewController:yourVC]; [popover setPopoverContentSize:CGSizeMake(1024, 1024)]; [popover presentPopoverFromRect:CGRectZero inView:appDelegate.splitViewController.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; 

You should notice that this is difficult to remove because it will β€œfill the screen” in portrait or landscape form. I have these methods in my appDelegate.splitViewController:

 - (BOOL)shouldAutomaticallyForwardRotationMethods { NSLog(@"MG - shouldAutomaticallyForwardRotationMethods"); return YES; } - (BOOL)automaticallyForwardAppearanceAndRotationMethodsToChildViewControllers { NSLog(@"MG - automaticallyForwardAppearanceAndRotationMethodsToChildViewControllers"); return YES; } 

Just show / hide the button in the corner of your VC to reject this:

 [popover dismissPopoverAnimated:YES]; 

It should also be noted that "popover" is a strong property, or you will receive a release message when it tries to present.

0
source

All Articles