func draggedItemIDs<ItemID>(for type: ItemID.Type) -> [ItemID] where ItemID : Hashable
Provides an array of identifiers of the currently dragged items
in a case when the items conform to the `Identifiable` protocol,
or identifiers were provided to SwiftUI separately.
Parameter type: The type of the identifiers.
Returns: The array with the identifiers of the dragged items if provided.
Returns an empty array if no dragged identifiers of a given type exist.
get · iOS 26.0+
draggedItemIndex
TypeScript
get draggedItemIndex(): number
Swift declaration
var draggedItemIndex: Int { get }
The index of the dragged item under the cursor.
get · iOS 26.0+
id
TypeScript
get id(): DragSession_ID
Swift declaration
var id: DragSession.ID { get }
The identifier of the drag session.
get · iOS 26.0+
phase
TypeScript
get phase(): DragSession_Phase
Swift declaration
var phase: DragSession.Phase { get }
The current phase of the drag session.
get · iOS 26.0+
location
TypeScript
get location(): { x: number; y: number }
Swift declaration
var location: CGPoint
Location of the drag session in the local coordinate space.
set · iOS 26.0+
location
TypeScript
set location(value: { x: number; y: number })
Swift declaration
var location: CGPoint
Location of the drag session in the local coordinate space.