---
title: selectionFollowsFocus
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uicollectionview/selectionfollowsfocus
---

# selectionFollowsFocus

A Boolean value that triggers an automatic selection when focus moves to a cell.

## Declaration

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

## Mentioned in

Building a desktop-class iPad app

## Discussion

Discussion The system determines the default value of this property according to the platform and other properties of the collection view.

## 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)
- [allowsSelection](uikit/uicollectionview/allowsselection.md)
- [allowsMultipleSelection](uikit/uicollectionview/allowsmultipleselection.md)
- [allowsSelectionDuringEditing](uikit/uicollectionview/allowsselectionduringediting.md)
- [allowsMultipleSelectionDuringEditing](uikit/uicollectionview/allowsmultipleselectionduringediting.md)
