Question

How to change the UIPrintInteractionController's navigation bar title (Printer Options)?

enter image description here

Was it helpful?

Solution

You can use UIPrintInteractionController's delegate methods for change appearance of it,

- (UIViewController *)printInteractionControllerParentViewController:   (UIPrintInteractionController *)printInteractionController
{
    return self.navigationController;
}
- (void)printInteractionControllerDidPresentPrinterOptions:(UIPrintInteractionController *)printInteractionController
{
    // self.navigationController.topViewController.navigationController.navigationBar.tintColor=[UIColor redColor];
    self.navigationController.navigationBar.tintColor = [UIColor greenColor];

   // self.navigationController.topViewController.navigationController.navigationBar.barTintColor=[UIColor purpleColor];
   self.navigationController.topViewController.navigationController.navigationBar.tintColor=[UIColor yellowColor];
}

OTHER TIPS

#pragma mark - Print Delegate -

- (UIViewController *)printInteractionControllerParentViewController:(UIPrintInteractionController *)printInteractionController {

    return self.navigationController;
}

- (void)printInteractionControllerDidPresentPrinterOptions:(UIPrintInteractionController *)printInteractionController {

 [[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleLightContent];
    self.navigationController.navigationBar.barTintColor = AppColor;
    self.navigationController.topViewController.navigationController.navigationBar.tintColor=[UIColor whiteColor];

 [[UINavigationBar appearance] setTitleTextAttributes:
     @{NSForegroundColorAttributeName: [UIColor whiteColor]}];
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top