---
title: previewProvider
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uidragitem/previewprovider
---

# previewProvider

A visual preview of the drag item, displayed while the user drags the item across the screen.

## Declaration

```swift
var previewProvider: (() -> UIDragPreview?)? { get set }
```

## Discussion

Discussion As the user drags an item across the screen, the system displays a preview. You can change the preview by setting previewProvider to a block that returns a UIDragPreview object. The system invokes the block if and when it needs the drag item preview. To use the default preview, set previewProvider to nil. To hide the preview, set previewProvider to a block that returns nil.

## See Also

### Changing the drag item preview

- [setNeedsDropPreviewUpdate()](uikit/uidragitem/setneedsdroppreviewupdate().md)
