I am trying to modify the printing options that appear when using UIPrint.
UIPrintInteractionController *pic;
void (^completionHandler)(UIPrintInteractionController *, BOOL, NSError *) =
^(UIPrintInteractionController *printController, BOOL completed, NSError *error) {
if (!completed && error) {
NSLog(@"Printing could not complete because of error: %@", error);
}
};
[pic presentAnimated:YES completionHandler:completionHandler];
There is a delegate that you can respond to called:
- (UIViewController *)printInteractionControllerParentViewController:(UIPrintInteractionController *)printInteractionController
If I return nil from this, the dialog shows up. If I return a view controller of navigation view controller, then the print options don't come up. I have no idea why.
On a related question is it possible to get a list of printers without using the print options at all and then print to a particular printer (thereby losing the need of having to show the printer options view).