onMove

Sets the move action for the dynamic view.

DynamicViewContent ModifieriOS 13.0+macOS 10.15+tvOS 13.0+watchOS 6.0+onMove(perform:) in SwiftUI

Declaration

React
compose().onMove({
  perform: ((arg0: number[], arg1: number) => void) | null,
})
Swift
nonisolated func onMove(
    perform action: Optional<(IndexSet, Int) -> Void>
) -> some DynamicViewContent

Parameters

  • options.perform*((arg0: number[], arg1: number) => void) | null

Return value

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

See also

More in DynamicViewContent modifiers.