<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSDraggingDestination/draggingUpdated(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSDraggingDestination(im)draggingUpdated:"
  },
  "title" : "draggingUpdated(_:)"
}
-->

# draggingUpdated(_:)

Invoked periodically as the image is held within the destination area, allowing modification of the dragging operation or mouse-pointer position.

```
@MainActor optional func draggingUpdated(_ sender: any NSDraggingInfo) -> NSDragOperation
```

## Parameters

`sender`

The object sending the message; use it to get details about the dragging operation.

## Return Value

One (and only one) of the dragging operation constants described  in [`NSDragOperation`](/documentation/AppKit/NSDragOperation) in the [`NSDraggingInfo`](/documentation/AppKit/NSDraggingInfo) reference. The default return value (if this method is not implemented by the destination) is the value returned by the previous [`draggingEntered(_:)`](/documentation/AppKit/NSDraggingDestination/draggingEntered(_:)) message.

## Discussion

For this to be invoked, the destination must have registered for the pasteboard data type involved in the drag operation. The messages continue until the image is either released or dragged out of the window or view.

This method provides the destination with an opportunity to modify the dragging operation depending on the position of the mouse pointer inside of the destination view or window object. For example, you may have several graphics or areas of text contained within the same view and wish to tailor the dragging operation, or to ignore the drag event completely, depending upon which object is underneath the mouse pointer at the time when the user releases the dragged image and the [`performDragOperation(_:)`](/documentation/AppKit/NSDraggingDestination/performDragOperation(_:)) method is invoked.

You typically examine the contents of the pasteboard in the [`draggingEntered(_:)`](/documentation/AppKit/NSDraggingDestination/draggingEntered(_:)) method, where this examination is performed only once, rather than in the [`draggingUpdated(_:)`](/documentation/AppKit/NSDraggingDestination/draggingUpdated(_:)) method, which is invoked multiple times.

Only one destination at a time receives a sequence of [`draggingUpdated(_:)`](/documentation/AppKit/NSDraggingDestination/draggingUpdated(_:)) messages. If the mouse pointer is within the bounds of two overlapping views that are both valid destinations, the uppermost view receives these messages until the image is either released or dragged out.

## See Also

[`prepareForDragOperation(_:)`](/documentation/AppKit/NSDraggingDestination/prepareForDragOperation(_:))

Invoked when the image is released, allowing the receiver to agree to or refuse drag operation.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)