Instance Method

drop(_:to:)

Animates the item to an arbitrary location in your view hierarchy.

Required.

Declaration

func drop(_ dragItem: UIDragItem, to target: UIDragPreviewTarget) -> UIDragAnimating

Parameters

dragItem

The item that you want to drop.

target

The location at which to drop the item, specified as a point in a view. You can also use the UIDragPreviewTarget object to specify a final transform to apply to the content.

Discussion

Use this method to animate drops to any view in your app. For example, you might use this method to drop items onto a tab bar or toolbar that is part of your interface.

See Also

Animating Items to Their Destination

func drop(UIDragItem, toItemAt: IndexPath) -> UIDragAnimating

Animates the item to the specified index path in the collection view.

Required.

func drop(UIDragItem, intoItemAt: IndexPath, rect: CGRect) -> UIDragAnimating

Animates the item to the specified rectangle in the collection view.

Required.