Instance Method


Sets the move action for the dynamic view.


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



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.

Return Value

A view that calls action when elements are moved within the original view.

See Also

Responding to Updates