DragSession

Describes the ongoing dragging session.

StructureiOS 26.0+macOS 26.0+visionOS 26.0+DragSession in SwiftUI

Declaration

React
type DragSession = { readonly draggedItemIndex: number; readonly id: DragSessionID; readonly location: CGPoint; readonly phase: DragSessionPhase; draggedItemIDs(options: { for: SwiftUnsupported<'ItemID.Type'>; }): Promise<SwiftUnsupported<'ItemID'>[]>; };
Swift
struct DragSession

Properties

  • draggedItemIndex*number

    The index of the dragged item under the cursor.

  • The identifier of the drag session.

  • location*CGPoint

    Location of the drag session in the local coordinate space.

  • The current phase of the drag session.

Used by

See also

More in Gestures and input.