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

# tableView(_:estimatedHeightForHeaderInSection:)

Asks the delegate for the estimated height of the header of a particular section.

## Declaration

```swift
optional func tableView(_ tableView: UITableView, estimatedHeightForHeaderInSection section: Int) -> CGFloat
```

## Parameters

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

## Mentioned in

Estimating the height of a table’s scrolling area

## Return Value

Return Value A nonnegative floating-point value that specifies the height (in points) of the header for section.

## Discussion

Discussion Providing an estimate the height of section headers can improve the user experience when loading the table view. If the table contains variable height section headers, it might be expensive to calculate all their heights and so lead to a longer load time. Using estimation allows you to defer some of the cost of geometry calculation from load time to scrolling time.

## See Also

### Related Documentation

- [tableView(_:heightForHeaderInSection:)](uikit/uitableviewdelegate/tableview(_:heightforheaderinsection:).md)

### Estimating heights for the table’s content

- [tableView(_:estimatedHeightForRowAt:)](uikit/uitableviewdelegate/tableview(_:estimatedheightforrowat:).md)
- [tableView(_:estimatedHeightForFooterInSection:)](uikit/uitableviewdelegate/tableview(_:estimatedheightforfooterinsection:).md)
