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

# allowsSelection

A Boolean value that determines whether users can select a row.

## Declaration

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

## Mentioned in

Handling row selection in a table view

## Discussion

Discussion If the value of this property is true (the default), users can select rows. If you set it to false, they can’t select rows. Setting this property affects cell selection only when the table view isn’t in editing mode. If you want to restrict selection of cells in editing mode, use allowsSelectionDuringEditing.

## See Also

### Selecting rows

- [indexPathForSelectedRow](uikit/uitableview/indexpathforselectedrow.md)
- [indexPathsForSelectedRows](uikit/uitableview/indexpathsforselectedrows.md)
- [selectRow(at:animated:scrollPosition:)](uikit/uitableview/selectrow(at:animated:scrollposition:).md)
- [deselectRow(at:animated:)](uikit/uitableview/deselectrow(at:animated:).md)
- [allowsMultipleSelection](uikit/uitableview/allowsmultipleselection.md)
- [allowsSelectionDuringEditing](uikit/uitableview/allowsselectionduringediting.md)
- [allowsMultipleSelectionDuringEditing](uikit/uitableview/allowsmultipleselectionduringediting.md)
- [selectionFollowsFocus](uikit/uitableview/selectionfollowsfocus.md)
- [selectionDidChangeNotification](uikit/uitableview/selectiondidchangenotification.md)
