Friday, May 31, 2013

Load ios print popover inside the our popover

I had a problem which is ,after opening the file there is a share button and when click the share button popover will be appeared. In this popover there are two button one of the button is print.

Problem is after clicking the print button print popover is showing the different popover reason is print popover is generated by ios only thing we need to input the some parameter which are file path of the print file,etc and print controller is not a UIviewcontroller so it cannot push to the navigation controller.

So iOs gave us to a delegate method it return the which navigation controller is needed to push.

Method is

 #pragma -mark UIPrintInteractionControllerDelegate

- (UIViewController *)printInteractionControllerParentViewController:(UIPrintInteractionController *)printInteractionController
{
return self.firstPopoverController.navigationController;
}

if you override the method you can load your print popover given navigation controller.

No comments:

Post a Comment