Initializer

init(view:parameters:)

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

Declaration

init(view: UIView, parameters: UIDragPreviewParameters)

Parameters

view

A UIView object representing the drag item.

parameters

A UIDragPreviewParameters object containing appearance parameters for the drag item preview.

Return Value

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

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 Bé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: UIView)

Initializes a new drag item preview with a view, using the default appearance parameters.

init(for: URL)

Initializes a new drag item preview with a URL.

init(for: URL, title: String?)

Initializes a drag item preview with a URL and title.