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

# draggingEntered(_:)

Invoked when the dragged image enters destination bounds or frame; delegate returns dragging operation to perform.

```
@MainActor optional func draggingEntered(_ 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

Invoked when a dragged image enters the destination but only if the destination has registered for the pasteboard data type involved in the drag operation. Specifically, this method is invoked when the mouse pointer enters the destination’s bounds rectangle (if it is a view object) or its frame rectangle (if it is a window object).

This method must return a value that indicates which dragging operation the destination will perform when the image is released. In deciding which dragging operation to return, the method should evaluate the overlap between both the dragging operations allowed by the source (obtained from `sender` with the [`draggingSourceOperationMask`](/documentation/AppKit/NSDraggingInfo/draggingSourceOperationMask) method) and the dragging operations and pasteboard data types the destination itself supports.

If none of the operations is appropriate, this method should return `NSDragOperationNone` (this is the default response if the method is not implemented by the destination). A destination will still receive [`draggingUpdated(_:)`](/documentation/AppKit/NSDraggingDestination/draggingUpdated(_:)) and [`draggingExited(_:)`](/documentation/AppKit/NSDraggingDestination/draggingExited(_:)) even if `NSDragOperationNone` is returned by this method.

## See Also

[Drag and Drop](/documentation/AppKit/drag-and-drop)

Support the direct manipulation of your app’s content using drag and drop.

[`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)