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

# collectionView(_:dragSessionWillBegin:)

Notifies you that a drag session is about to begin for the collection view.

```
optional func collectionView(_ collectionView: UICollectionView, dragSessionWillBegin session: any UIDragSession)
```

## Parameters

`collectionView`

The collection view from which the drag operation originated.

`session`

The drag session that’s beginning.

## Discussion

This method is called after it has been determined that a drag will begin and after any lift animations have occurred, but before the position of the drag changes. Use this method to perform any tasks related to the management of the drag session in your app.

Each call to this method is always balanced by a call to the [`collectionView(_:dragSessionDidEnd:)`](/documentation/UIKit/UICollectionViewDragDelegate/collectionView(_:dragSessionDidEnd:)) method.

---

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)