Instance Method


Defines the destination of a drag and drop operation with the same size and position as the view using behavior controlled by the given delegate.


func onDrop(of supportedTypes: [String], delegate: DropDelegate) -> some View



The uniform type identifiers that describe the types of content this view can accept through drag and drop. If the drag and drop operation doesn’t contain any of the supported types, then this drop destination doesn’t activate and isTargeted doesn’t update.


A type that conforms to the DropDelegate protocol. You have comprehensive control over drop behavior when you use a delegate.

Return Value

A view that provides a drop destination for a drag operation of the specified types.