---
title: "init(view:parameters:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uidragpreview/init(view:parameters:)"
---

# init(view:parameters:)

Initializes a new drag item preview with a view and with a set of appearance parameters.

## Declaration

```swift
init(view: UIView, parameters: UIDragPreviewParameters)
```

## Parameters

- `view`: A doc://com.apple.uikit/documentation/UIKit/UIView object representing the drag item.
- `parameters`: A doc://com.apple.uikit/documentation/UIKit/UIDragPreviewParameters object containing appearance parameters for the drag item preview.

## Return Value

Return Value A drag preview that is based on the specified view and has specific appearance parameters.

## Discussion

Discussion Use this method to display a custom drag item preview based on the provided view and appearance parameters. The appearance parameters specify display options for the preview, such as a background color and a Bézier path of the visible area of the provided view. The appearance parameters affect only the display of the preview, and not the provided view. The drag item preview uses a snapshot of the view for the display, and it never changes or moves the view.

## See Also

### Initializing a drag item preview

- [init(view:)](uikit/uidragpreview/init(view:).md)
- [init(forURL:)](uikit/uidragpreview/init(forurl:).md)
- [init(forURL:title:)](uikit/uidragpreview/init(forurl:title:).md)
