---
title: allowsSelection
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uicollectionview/allowsselection
---

# allowsSelection

A Boolean value that indicates whether users can select items in the collection view.

## Declaration

```swift
var allowsSelection: Bool { get set }
```

## Discussion

Discussion If the value of this property is true (the default), users can select items. If you want more fine-grained control over the selection of items, you must provide a delegate object and implement the appropriate methods of the UICollectionViewDelegate protocol.

## See Also

### Selecting cells

- [indexPathsForSelectedItems](uikit/uicollectionview/indexpathsforselecteditems.md)
- [selectItem(at:animated:scrollPosition:)](uikit/uicollectionview/selectitem(at:animated:scrollposition:).md)
- [deselectItem(at:animated:)](uikit/uicollectionview/deselectitem(at:animated:).md)
- [allowsMultipleSelection](uikit/uicollectionview/allowsmultipleselection.md)
- [allowsSelectionDuringEditing](uikit/uicollectionview/allowsselectionduringediting.md)
- [allowsMultipleSelectionDuringEditing](uikit/uicollectionview/allowsmultipleselectionduringediting.md)
- [selectionFollowsFocus](uikit/uicollectionview/selectionfollowsfocus.md)
