UIPrintInteractionController.CompletionHandler
A completion handler for responding to the completion of a print job or for handling printing errors.
Declaration
typealias CompletionHandler = (UIPrintInteractionController, Bool, (any Error)?) -> VoidDiscussion
You implement this block as the final argument of present(animated:completionHandler:), present(from:animated:completionHandler:), or present(from:in:animated:completionHandler:). When a print job concludes, you can reset any state set up for printing and do related housekeeping tasks. If the print job encountered an error, it is likely to be a programming error, so you might want to log the error for debugging purposes.
printInteractionControllerThe shared instance of
UIPrintInteractionControllerthat is managing the print job.completedA Boolean value that indicates whether the print job completed successfully.
errorAn instance of the NSError that contains information about the printing error. The printing domain is UIPrintErrorDomain. The printing error codes are described in
UIKit Printing Error Codes. If the print job completes successfully, this parameter isnil.