Initializer

init(for:target:)

Initializes a new targeted drag item preview with a URL and a drag item preview.

Declaration

convenience init(for url: URL, target: UIDragPreviewTarget)

Parameters

url

An Internet address referencing a remote resource, such as a webpage.

target

A drag item preview target.

Return Value

A targeted drag preview for a URL based on the drag item preview target.

Discussion

This method creates a targeted drag item preview of the URL. The URL preview is a one-line, textual representation that might not show the full URL string. Don't use a file URL.

See Also

Initializing a Targeted Drag Item Preview

init(for: URL, title: String?, target: UIDragPreviewTarget)

Initializes a new targeted drag item preview with a URL, a title, and a drag item preview.