---
title: "collectionView(_:shouldBeginMultipleSelectionInteractionAt:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uicollectionviewdelegate/collectionview(_:shouldbeginmultipleselectioninteractionat:)"
---

# collectionView(_:shouldBeginMultipleSelectionInteractionAt:)

Asks the delegate whether the user can select multiple items using a two-finger pan gesture in a collection view.

## Declaration

```swift
optional func collectionView(_ collectionView: UICollectionView, shouldBeginMultipleSelectionInteractionAt indexPath: IndexPath) -> Bool
```

## Parameters

- `collectionView`: The collection view calling this method.
- `indexPath`: The index path of the item that the user touched to start the two-finger pan gesture.

## Return Value

Return Value true to allow the user to select multiple items using a two-finger pan gesture; otherwise, false to disable the behavior. The default value is false.

## Discussion

Discussion When the system recognizes a two-finger pan gesture, it calls this method before it sets isEditing to true. If you return true from this method, the user can select multiple items using a two-finger pan gesture. Users can select multiple items using the two-finger pan gesture on collection views that scroll either horizontally or vertically, but not both. Collection views that scroll in both directions won’t recognize the gesture or call this method. If you don’t implement this method, the system uses the value of allowsMultipleSelectionDuringEditing to determine whether a user can select multiple items using a pan gesture.

## See Also

### Managing the selected cells

- [Changing the appearance of selected and highlighted cells](uikit/changing-the-appearance-of-selected-and-highlighted-cells.md)
- [Selecting multiple items with a two-finger pan gesture](uikit/selecting-multiple-items-with-a-two-finger-pan-gesture.md)
- [collectionView(_:shouldSelectItemAt:)](uikit/uicollectionviewdelegate/collectionview(_:shouldselectitemat:).md)
- [collectionView(_:didSelectItemAt:)](uikit/uicollectionviewdelegate/collectionview(_:didselectitemat:).md)
- [collectionView(_:shouldDeselectItemAt:)](uikit/uicollectionviewdelegate/collectionview(_:shoulddeselectitemat:).md)
- [collectionView(_:didDeselectItemAt:)](uikit/uicollectionviewdelegate/collectionview(_:diddeselectitemat:).md)
- [collectionView(_:didBeginMultipleSelectionInteractionAt:)](uikit/uicollectionviewdelegate/collectionview(_:didbeginmultipleselectioninteractionat:).md)
- [collectionViewDidEndMultipleSelectionInteraction(_:)](uikit/uicollectionviewdelegate/collectionviewdidendmultipleselectioninteraction(_:).md)
