Class

UIDragPreview

A graphical preview for a single drag item, used by the system after a drag has started and when no related animation is running.

Declaration

class UIDragPreview : NSObject

Overview

A UIDragPreview object is a visual representation of the drag item. The preview is displayed while the user moves the item across the screen with their finger (after the lift animation completes). The preview disappears when the user lifts their finger, triggering the start of the drop or cancellation animation.

Topics

Initializing a Drag Item Preview

init(view: UIView)

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

init(view: UIView, parameters: UIDragPreviewParameters)

Initializes a new drag item preview with a view and with a set of 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.

Getting the Visual Appearance Parameters

var parameters: UIDragPreviewParameters

The appearance parameters associated with the drag item preview.

Accessing the View

var view: UIView

The view associated with the drag item preview.

Relationships

Inherits From

See Also

Custom Drag Item Previews

class UIDragPreviewParameters

A set of parameters for adjusting the appearance of a drag item preview or a targeted drag item preview.

class UIDragPreviewTarget

A geometric specification for the source or destination of a drag item preview, used by the system when a user drops items or cancels a drag activity.

class UITargetedDragPreview

A drag item preview used by the system during lift, drop, or cancellation animation.