---
title: indexPathForSelectedRow
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uitableview/indexpathforselectedrow
---

# indexPathForSelectedRow

An index path that identifies the row and section of the selected row.

## Declaration

```swift
var indexPathForSelectedRow: IndexPath? { get }
```

## Discussion

Discussion The value of this property is an index path identifying the row and section indexes of the selected row, or nil if the index path is invalid. If there are multiple selections, this property contains the first index-path object in the array of row selections; this object has the lowest index values for section and row.

## See Also

### Selecting rows

- [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)
- [allowsSelection](uikit/uitableview/allowsselection.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)
