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

# tableView(_:selectionFollowsFocusForRowAt:)

Asks the delegate whether to relate selection and focus behavior for the row at the corresponding index path.

## Declaration

```swift
optional func tableView(_ tableView: UITableView, selectionFollowsFocusForRowAt indexPath: IndexPath) -> Bool
```

## Parameters

- `tableView`: The table view making the request.
- `indexPath`: The index path of the row to determine selection behavior for.

## Return Value

Return Value true if you want to automatically select the row at the specified index path when focus moves to it; otherwise, false.

## Discussion

Discussion If the table view’s selectionFollowsFocus property is true and you return false from this delegate method, focus still moves to the row when the user selects it. However, when focus moves to the row, the row doesn’t automatically select.

## See Also

### Managing table view focus

- [tableView(_:canFocusRowAt:)](uikit/uitableviewdelegate/tableview(_:canfocusrowat:).md)
- [tableView(_:shouldUpdateFocusIn:)](uikit/uitableviewdelegate/tableview(_:shouldupdatefocusin:).md)
- [tableView(_:didUpdateFocusIn:with:)](uikit/uitableviewdelegate/tableview(_:didupdatefocusin:with:).md)
- [indexPathForPreferredFocusedView(in:)](uikit/uitableviewdelegate/indexpathforpreferredfocusedview(in:).md)
