---
title: "tableView(_:numberOfRowsInSection:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitableviewdatasource/tableview(_:numberofrowsinsection:)"
---

# tableView(_:numberOfRowsInSection:)

Tells the data source to return the number of rows in a given section of a table view.

## Declaration

```swift
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int
```

## Parameters

- `tableView`: The table-view object requesting this information.
- `section`: An index number identifying a section in tableView.

## Return Value

Return Value The number of rows in section.

## See Also

### Providing the number of rows and sections

- [numberOfSections(in:)](uikit/uitableviewdatasource/numberofsections(in:).md)
