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

onMove(perform:)

Sets the move action for the dynamic view. 動的ビューに対する移動アクションを設定します。

Declaration 宣言

func onMove(perform action: Optional<(IndexSet, Int) -> Void>) -> some DynamicViewContent

Return Value 戻り値

A view that calls action when elements are moved within the original view. あるビュー、それは要素が元のビュー内で移動される時にactionを呼び出します。

Parameters パラメータ

action

A closure that SwiftUI invokes when elements in the dynamic view are moved. The closure takes two arguments that represent the offset relative to the dynamic view’s underlying collection of data. Pass nil to disable the ability to move items. あるクロージャ、それは動的ビューの中の要素それらが移動される時にSwiftUIが発動します。クロージャは2つの引数をとります、それは動的ビューのもつ基礎をなすデータのコレクションに相対的なオフセットを表します。nilを渡すことで、項目を移動する能力を作動しないようにしてください。