Defines the destination of a drag and drop operation with the same size and position as the view by handling dropped content and the drop location with the specified closure.
- macOS 10.15+
- Xcode 11.0+
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
A binding that updates when a drag and drop operation enters or exits the drop target area. The binding’s value is
truewhen the cursor is inside the area, and
falsewhen the cursor is outside.
A closure that takes the dropped content and responds appropriately. The first parameter to
actioncontains the dropped items, with types specified by
supported. The second parameter contains the drop location in this view’s coordinate space. Return
trueif the drop operation was successful; otherwise, return
A view that provides a drop destination for a drag operation of the specified types.