---
title: "tableView(_:didSelectRowAt:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitableviewdelegate/tableview(_:didselectrowat:)"
---

# tableView(_:didSelectRowAt:)

Tells the delegate a row is selected.

## Declaration

```swift
optional func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)
```

## Parameters

- `tableView`: A table view informing the delegate about the new row selection.
- `indexPath`: An index path locating the new selected row in tableView.

## Mentioned in

Handling row selection in a table view

## Discussion

Discussion The delegate handles selections in this method. For instance, you can use this method to assign a checkmark (UITableViewCell.AccessoryType.checkmark) to one row in a section in order to create a radio-list style. The system doesn’t call this method if the rows in the table aren’t selectable. See Handling row selection in a table view for more information on controlling table row selection behavior.

## See Also

### Responding to row selections

- [Handling row selection in a table view](uikit/handling-row-selection-in-a-table-view.md)
- [Selecting multiple items with a two-finger pan gesture](uikit/selecting-multiple-items-with-a-two-finger-pan-gesture.md)
- [tableView(_:willSelectRowAt:)](uikit/uitableviewdelegate/tableview(_:willselectrowat:).md)
- [tableView(_:willDeselectRowAt:)](uikit/uitableviewdelegate/tableview(_:willdeselectrowat:).md)
- [tableView(_:didDeselectRowAt:)](uikit/uitableviewdelegate/tableview(_:diddeselectrowat:).md)
- [tableView(_:shouldBeginMultipleSelectionInteractionAt:)](uikit/uitableviewdelegate/tableview(_:shouldbeginmultipleselectioninteractionat:).md)
- [tableView(_:didBeginMultipleSelectionInteractionAt:)](uikit/uitableviewdelegate/tableview(_:didbeginmultipleselectioninteractionat:).md)
- [tableViewDidEndMultipleSelectionInteraction(_:)](uikit/uitableviewdelegate/tableviewdidendmultipleselectioninteraction(_:).md)
