<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIPrinterPickerController/CompletionHandler",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@T@UIPrinterPickerCompletionHandler"
  },
  "title" : "UIPrinterPickerController.CompletionHandler"
}
-->

# UIPrinterPickerController.CompletionHandler

The completion handler to execute when dismissing a printer picker controller.

```
typealias CompletionHandler = (UIPrinterPickerController, Bool, (any Error)?) -> Void
```

## Discussion

A printer picker completion handler takes the following parameters:

- printerPickerController: The printer picker controller object that is being dismissed. This parameter contains information about the selected printer, if any.
- userDidSelect: <doc://com.apple.documentation/documentation/Swift/true> if the user selected a printer or <doc://com.apple.documentation/documentation/Swift/false> if the user canceled the selection process. When this parameter is <doc://com.apple.documentation/documentation/Swift/true>, use the `printerPickerController` object to retrieve the selected printer object.
- error: An <doc://com.apple.documentation/documentation/Foundation/NSError> object if there was a problem with the printer picker or `nil` if a printer was selected or the user canceled the picker.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)