---
title: "setDrop(_:dropOperation:)"
framework: quartz
role: symbol
role_heading: Instance Method
path: "quartz/ikimagebrowserview/setdrop(_:dropoperation:)"
---

# setDrop(_:dropOperation:)

Allows the class to retarget the drop action.

## Declaration

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

## Parameters

- `index`: The requested drop index.
- `operation`: The requested drop operation. The possible values are described in doc://com.apple.quartz/documentation/Quartz/IKImageBrowserDropOperation.

## Discussion

Discussion For example, To specify a drop on the second item, one would specify index as 1, and operation as IKImageBrowserDropOn. To specify a drop after the last item, one would specify index as the number of items and operation as IKImageBrowserDropBefore. Passing a value of –1 for index, and 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 .

## See Also

### Supporting Drag and Drop

- [setDraggingDestinationDelegate(_:)](quartz/ikimagebrowserview/setdraggingdestinationdelegate(_:).md)
- [draggingDestinationDelegate()](quartz/ikimagebrowserview/draggingdestinationdelegate().md)
- [indexAtLocationOfDroppedItem()](quartz/ikimagebrowserview/indexatlocationofdroppeditem().md)
- [setAllowsDroppingOnItems(_:)](quartz/ikimagebrowserview/setallowsdroppingonitems(_:).md)
- [allowsDroppingOnItems()](quartz/ikimagebrowserview/allowsdroppingonitems().md)
- [dropOperation()](quartz/ikimagebrowserview/dropoperation().md)
