1
我按UIPrintInteractionControllerDelegate
的要求执行printInteractionControllerParentViewController:
来定制显示打印选项的弹出窗口。这是运行,弹出窗口出现在(肖像)iPad的整个高度的大小,在缩小到正常大小之前。如何实现printInteractionControllerParentViewController:使用弹出窗口?
任何关于如何以更合理的方式显示弹出窗口的建议将会有所帮助。
这里是我的实现:
- (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;
}