印刷オプションを表示するポップオーバーをカスタマイズするためにprintInteractionControllerParentViewController:
、必要に応じて実装しています。UIPrintInteractionControllerDelegate
これが実行されると、ポップオーバーは (ポートレート) iPad の全高のサイズで表示され、通常のサイズに縮小されます。
ポップオーバーをより賢明な方法で表示する方法についてのアドバイスは役に立ちます。
これが私の実装です:
- (UIViewController*)printInteractionControllerParentViewController:(UIPrintInteractionController*)printInteractionController {
UINavigationController* navigationController = [[UINavigationController alloc] init];
popover = [[UIPopoverController alloc] initWithContentViewController:navigationController];
[popover setPopoverBackgroundViewClass:[CustomPopoverBackgroundView class]];
[popover presentPopoverFromRect:_printButton.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
[popover.contentViewController.view setBackgroundColor:backgroundColor];
return navigationController;
}