Instance Method


Applies the given transaction mutation function to all transactions used within the view.


func transaction(_ transform: @escaping (inout Transaction) -> Void) -> some View



The transformation to apply to transactions within this view.

Return Value

A view that wraps this view and applies transformation to all transactions used within the view.


Use this modifier on leaf views rather than container views. The transformation applies to all child views within this view; calling transaction(_:) on a container view can lead to unbounded scope.

See Also

Handling View Taps and Gestures

func itemProvider(Optional<() -> NSItemProvider?>) -> View

Provides a closure that vends the drag representation to be used for a particular data element.