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.
source share