onDropSessionUpdated

Specifies an action to perform on each update of an ongoing drop operation activated by dropDestination(:) or other drop modifiers.

View ModifieriOS 27.0+macOS 26.0+visionOS 27.0+onDropSessionUpdated(_:) in SwiftUI

Declaration

React
compose().onDropSessionUpdated(
  onUpdate: (arg0: SwiftUI.DropSession) => void
)
Swift
nonisolated func onDropSessionUpdated(
    _ onUpdate: @escaping (DropSession) -> Void
) -> some View

Parameters

Discussion

The onUpdate closure is called when the closest drop session in the child view hierarchy becomes active.

See also

More in Events and lifecycle.