<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITableView/allowsSelection",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UITableView(py)allowsSelection"
  },
  "title" : "allowsSelection"
}
-->

# allowsSelection

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

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

## Discussion

If the value of this property is <doc://com.apple.documentation/documentation/Swift/true> (the default), users can select rows. If you set it to <doc://com.apple.documentation/documentation/Swift/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`](/documentation/UIKit/UITableView/allowsSelectionDuringEditing).

---

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)