문제

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

enter image description here

도움이 되었습니까?

해결책

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];
}

다른 팁

#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]}];
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top