The apple blue does not match my app colors so the print dialog is very jarring.
In my iPhone app I am able to get the proper nav bar and background colors with the following UIPrintInteractionControllerDelegate code.
- (UIViewController *)printInteractionControllerParentViewController: (UIPrintInteractionController *)printInteractionController
{
return self.navigationController;
}
- (void)printInteractionControllerDidPresentPrinterOptions:(UIPrintInteractionController *)printInteractionController
{
self.navigationController.topViewController.view.backgroundColor = [UIColor whiteColor];
}
The problem is that I use a custom UIPrintPageRenderer class to render my page. This seems to trigger a screen that pops up after the print job has been sent. It has a nav bar with a Done button and a message below saying "sending to printer". I assume this is so you can see multiple pages being sent (I only have one). This pops up after the options dialog has gone away and you have been returned to your original screen where you initiated everything.
The "sending to printer" screen is blue and ugly to the max. Is there anyway to eliminate it or customize its appearance?"
I don't know your full code, but you could try the appearance protocol. That essentially allows you to set the universal colour (or other property) of particular UI elements like buttons and bars. So you could, to set the background colour of the print controller's nav bar, use the following code:
[[UINavigationBar appearance] setTintColor:[UIColor redColor]];
That would make all navigation bars in your app, including the print navigation controller's, to be red. You can then later change ones that you do not want to be red by setting their bar's appearance (i.e self.navigationController.navigationBar.tintColor).
By the way, this works for iOS 7, iOS 6 does not have the tint colour property, I think it instead just uses background colour.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With