<!--
{
  "availability" : [
    "macOS: 10.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Quartz",
  "identifier" : "/documentation/Quartz/IKImageBrowserView/setDrop(_:dropOperation:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Quartz"
    ],
    "preciseIdentifier" : "c:objc(cs)IKImageBrowserView(im)setDropIndex:dropOperation:"
  },
  "title" : "setDrop(_:dropOperation:)"
}
-->

# setDrop(_:dropOperation:)

Allows the class to retarget the drop action.

```
func setDrop(_ index: Int, dropOperation operation: IKImageBrowserDropOperation)
```

## Parameters

`index`

The requested drop index.

`operation`

The requested drop operation. The possible values are described in [`IKImageBrowserDropOperation`](/documentation/Quartz/IKImageBrowserDropOperation).

## Discussion

For example, To specify a drop on the second item, one would specify index as `1`, and operation as [`IKImageBrowserDropOn`](/documentation/Quartz/IKImageBrowserDropOn). To specify a drop after the last item, one would specify index as the number of items and operation as [`IKImageBrowserDropBefore`](/documentation/Quartz/IKImageBrowserDropBefore).

Passing a value of `–1` for `index`, and [`IKImageBrowserDropOn`](/documentation/Quartz/IKImageBrowserDropOn) as the operation causes the entire browser view to be highlighted rather than a specific item. This is useful if the data displayed by the receiver does not allow the user to drop items at a specific item location

.

---

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)