<!--
{
  "availability" : [
    "iOS: 9.0.0 - 15.0.0",
    "iPadOS: 9.0.0 - 15.0.0",
    "macCatalyst: 13.1.0 - 15.0.0",
    "tvOS: 9.0.0 - 15.0.0",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICollectionViewDelegate/collectionView(_:targetIndexPathForMoveFromItemAt:toProposedIndexPath:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UICollectionViewDelegate(im)collectionView:targetIndexPathForMoveFromItemAtIndexPath:toProposedIndexPath:"
  },
  "title" : "collectionView(_:targetIndexPathForMoveFromItemAt:toProposedIndexPath:)"
}
-->

# collectionView(_:targetIndexPathForMoveFromItemAt:toProposedIndexPath:)

Asks the delegate for the index path to use when moving an item.

```
optional func collectionView(_ collectionView: UICollectionView, targetIndexPathForMoveFromItemAt currentIndexPath: IndexPath, toProposedIndexPath proposedIndexPath: IndexPath) -> IndexPath
```

## Parameters

`collectionView`

The collection view making the request.

`currentIndexPath`

The item’s original index path.

`proposedIndexPath`

The proposed index path of the item.

## Return Value

The index path you want to use for the item. If you do not implement this method, the collection view uses the index path in the `proposedIndexPath` parameter.

## Discussion

During the interactive moving of an item, the collection view calls this method to see if you want to provide a different index path than the proposed path. You might use this method to prevent the user from dropping the item in an invalid location. For example, you might prevent the user from dropping the item in a specific section.

---

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)