---
title: "tableView(_:didEndDisplayingHeaderView:forSection:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitableviewdelegate/tableview(_:didenddisplayingheaderview:forsection:)"
---

# tableView(_:didEndDisplayingHeaderView:forSection:)

Tells the delegate that the specified header view was removed from the table.

## Declaration

```swift
optional func tableView(_ tableView: UITableView, didEndDisplayingHeaderView view: UIView, forSection section: Int)
```

## Parameters

- `tableView`: The table view that removed the view.
- `view`: The header view that was removed.
- `section`: The index of the section that contained the header.

## Discussion

Discussion Use this method to detect when a header view is removed from a table view, as opposed to monitoring the view itself to see when it appears or disappears.

## See Also

### Tracking the removal of views

- [tableView(_:didEndDisplaying:forRowAt:)](uikit/uitableviewdelegate/tableview(_:didenddisplaying:forrowat:).md)
- [tableView(_:didEndDisplayingFooterView:forSection:)](uikit/uitableviewdelegate/tableview(_:didenddisplayingfooterview:forsection:).md)
