2013-12-12 2 views

답변

5

당신은, 그것의 변화 모습을 위해 일했다

- (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]; 
} 
+0

감사를 UIPrintInteractionController의 위임 방법을 사용할 수 있습니다. 그러나 인쇄 컨트롤러가 전체보기를 커버하므로 인쇄 컨트롤러를 팝업으로 유지해야합니다. – Hokage

+2

콘텐츠 컨트롤러로 탐색 컨트롤러가있는 팝 오버를 만들어야합니다. 그런 다음 대리모 printInteractionControllerParentViewController에 탐색 컨트롤러를 반환합니다. – Hokage

+0

@Allan : 안녕하세요, 지연으로 인해 미안합니다. 제 업무에 바빴습니다. 문제는 해결 되었습니까? –

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