---
title: numberOfSections
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uitableview/numberofsections
---

# numberOfSections

The number of sections in the table view.

## Declaration

```swift
var numberOfSections: Int { get }
```

## Discussion

Discussion UITableView gets the value in this property from its data source and caches it.

## See Also

### Getting the number of rows and sections

- [numberOfRows(inSection:)](uikit/uitableview/numberofrows(insection:).md)
