---
title: "rectForRow(at:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitableview/rectforrow(at:)"
---

# rectForRow(at:)

Returns the drawing area for a row that an index path identifies.

## Declaration

```swift
func rectForRow(at indexPath: IndexPath) -> CGRect
```

## Parameters

- `indexPath`: An index path object that identifies a row by its index and its section index.

## Return Value

Return Value A rectangle defining the area in which the table view draws the row or CGRectZero if indexPath is invalid.

## See Also

### Getting the drawing areas for the table

- [rect(forSection:)](uikit/uitableview/rect(forsection:).md)
- [rectForFooter(inSection:)](uikit/uitableview/rectforfooter(insection:).md)
- [rectForHeader(inSection:)](uikit/uitableview/rectforheader(insection:).md)
