---
title: "dismiss(animated:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiprinterpickercontroller/dismiss(animated:)"
---

# dismiss(animated:)

Dismisses the picker.

## Declaration

```swift
func dismiss(animated: Bool)
```

## Parameters

- `animated`: doc://com.apple.documentation/documentation/Swift/true to animate the dismissal of the picker or doc://com.apple.documentation/documentation/Swift/false to remove it without animations.

## Discussion

Discussion This method dismisses a picker that you previously presented. When using this method to dismiss a picker, the picker does not call the printerPickerControllerWillDismiss(_:) or printerPickerControllerDidDismiss(_:) methods of your delegate object. User interactions with the picker can also dismiss the picker automatically. For example, if the user selects a printer or cancels the picker, the picker dismisses itself automatically. Use this method to dismiss a picker programmatically in response to other events in your app.

## See Also

### Presenting and dismissing the picker

- [present(animated:completionHandler:)](uikit/uiprinterpickercontroller/present(animated:completionhandler:).md)
- [present(from:animated:completionHandler:)](uikit/uiprinterpickercontroller/present(from:animated:completionhandler:).md)
- [present(from:in:animated:completionHandler:)](uikit/uiprinterpickercontroller/present(from:in:animated:completionhandler:).md)
