Instance Method インスタンスメソッド

onDrop(of:delegate:)

Defines the destination of a drag and drop operation using behavior controlled by the delegate that you provide. ドラッグアンドドロップ操作の行き先を定義します、あなたが提供する委任先によって制御された挙動を使って。

Declaration 宣言

func onDrop(of supportedContentTypes: [UTType], delegate: DropDelegate) -> some View

Return Value 戻り値

A view that provides a drop destination for a drag operation of the specified types. あるビュー、それは指定された型のドラッグ操作に対してドロップ目的地を提供するものです。

Parameters パラメータ

supportedContentTypes

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. ユニホーム型識別子いくつか、それらはこのビューがドラッグ&ドロップを通して受け入れ可能な内容の型を記述します。ドラッグ&ドロップ操作がこのサポートされる型のどれも含まないならば、その時このドロップ目的地は活動的になりません、そしてisTargetedは更新しません。

delegate

A type that conforms to the DropDelegate protocol. You have comprehensive control over drop behavior when you use a delegate. ある型、それはDropDelegateプロトコルに準拠するものです。あなたは、ドロップ挙動について、あなたが委任先を使う場合に、包括的な制御を持ちます。

Discussion 議論

The drop destination is the same size and position as this view.

See Also 参照

Drag and Drop