Protocol: UIPrintInteractionControllerDelegate

Overview

The UIPrintInteractionControllerDelegate protocol is implemented by the delegate of the UIPrintInteractionController shared instance to perform a number of optional tasks. Asks the delegate for an object encapsulating the paper size and printing area to use for the print job.Tells the delegate that the printer user interface is being dismissed.Tells the delegate that the print job has ended. Tells the delegate that the printing-options user interface has just been presented.Returns a parent view controller for managing the printing-options view.Tells the delegate that the printing-options user interface will be dismissed.Tells the delegate that the printing-options user interface is about to be displayed. Tells the delegate that the print job is about to start.

Instance Method Summary (collapse)

Instance Method Details

- (UIPrintPaper) printInteractionController(printInteractionController, choosePaper:paperList)

Asks the delegate for an object encapsulating the paper size and printing area to use for the print job. This method is intended for applications (typically document-based) that have a notion of distinct paper sizes. The delegate can examine the objects in paperList to locate the paper size and printable rectangle combination that is best suited for its needs and return the encapsulating UIPrintPaper object. Or it can call the bestPaperForPageSize:withPapersFromArray: class method of the UIPrintPaper class, passing in a specific page size (typically the document size), and return the object returned by that method.

Parameters:

Returns:

  • (UIPrintPaper)

    A UIPrintPaper object representing both the paper size and imageable area (or printable rectangle) to use for the print job. If you return nil, a UIPrintPaper encapsulating the default paper size and printable rectangle is used.

- (Object) printInteractionControllerDidDismissPrinterOptions(printInteractionController)

Tells the delegate that the printer user interface is being dismissed. This message is sent both when the user taps Print on the printing-options view and when the user dismisses the view by tapping outside it.

Parameters:

Returns:

- (Object) printInteractionControllerDidFinishJob(printInteractionController)

Tells the delegate that the print job has ended. You can implement this method to do clean-up tasks related to the print job. This method is called after the last page of the print job is generated but before the completion handler (a block handler of type UIPrintInteractionCompletionHandler) is called.

Parameters:

Returns:

- (Object) printInteractionControllerDidPresentPrinterOptions(printInteractionController)

Tells the delegate that the printing-options user interface has just been presented.

Parameters:

Returns:

- (UIViewController) printInteractionControllerParentViewController(printInteractionController)

Returns a parent view controller for managing the printing-options view. This method allows an application to present the print-options view from a view controller of their own choosing. The parent view controller returned must be a UIViewController object, such as a UINavigationController object or a generic view controller. A common strategy for embedding is to create a UINavigationController object as the content view controller (contentViewController property) of a UIPopoverController object and return that. UIKit can push the returned view controller onto the stack if its parent is a navigation controller or present it modally if it isn’t.This method is invoked in any of the present… methods of the UIPrintInteractionController class (for example, presentAnimated:completionHandler:).

Parameters:

Returns:

  • (UIViewController)

    The view controller that is to be the parent of the print-interaction controller managing the printing-options view. Return nil for the standard presentation behavior.

- (Object) printInteractionControllerWillDismissPrinterOptions(printInteractionController)

Tells the delegate that the printing-options user interface will be dismissed.

Parameters:

Returns:

- (Object) printInteractionControllerWillPresentPrinterOptions(printInteractionController)

Tells the delegate that the printing-options user interface is about to be displayed.

Parameters:

Returns:

- (Object) printInteractionControllerWillStartJob(printInteractionController)

Tells the delegate that the print job is about to start. You can implement this method to do set-up tasks related to the print job. For example, an application that needs to do intensive rendering could implement this method to pause animations. This method is called before drawing begins but after the printing user interface is dismissed.

Parameters:

Returns: