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

# setDraggingSourceOperationMask(_:forLocal:)

Configures the drag operation mask.

```
func setDraggingSourceOperationMask(_ dragOperationMask: NSDragOperation, forLocal localDestination: Bool)
```

## Parameters

`dragOperationMask`

The types of drag operations allowed.

`localDestination`

If <doc://com.apple.documentation/documentation/Swift/true>, mask applies when the drag destination object is in the same application as the receiver; if <doc://com.apple.documentation/documentation/Swift/false>, mask applies when the destination object is outside the receiver’s application.

## Discussion

This method configures the default value returned from <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/draggingSourceOperationMaskForLocal:>. By default, this method returns [`every`](/documentation/AppKit/NSDragOperation/every) when `localDestination` is <doc://com.apple.documentation/documentation/Swift/true> and [`NSDragOperationNone`](/documentation/AppKit/NSDragOperation/NSDragOperationNone) when `localDestination` is <doc://com.apple.documentation/documentation/Swift/false>. `NSCollectionView` will save the values you set for each `localDestination` value.

You typically will invoke this method, and not override it.

---

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)