<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITableViewHeaderFooterView",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UITableViewHeaderFooterView"
  },
  "title" : "UITableViewHeaderFooterView"
}
-->

# UITableViewHeaderFooterView

A reusable view that you place at the top or bottom of a table section to display additional information for that section.

```
@MainActor class UITableViewHeaderFooterView
```

## Overview

Use [`UITableViewHeaderFooterView`](/documentation/UIKit/UITableViewHeaderFooterView) objects to manage the header and footer content of your table’s sections efficiently. A header-footer view is a reusable view that you can subclass or use as is. To configure the content and appearance of a header-footer view, you can set its [`contentConfiguration`](/documentation/UIKit/UITableViewHeaderFooterView/contentConfiguration-6b4eg) and [`backgroundConfiguration`](/documentation/UIKit/UITableViewHeaderFooterView/backgroundConfiguration-52wng).

To promote the reuse of your header-footer views, register them by calling the [`register(_:forHeaderFooterViewReuseIdentifier:)`](/documentation/UIKit/UITableView/register(_:forHeaderFooterViewReuseIdentifier:)-20ybb) or [`register(_:forHeaderFooterViewReuseIdentifier:)`](/documentation/UIKit/UITableView/register(_:forHeaderFooterViewReuseIdentifier:)-1rgvc) method of the table view. In the [`tableView(_:viewForHeaderInSection:)`](/documentation/UIKit/UITableViewDelegate/tableView(_:viewForHeaderInSection:)) or [`tableView(_:viewForFooterInSection:)`](/documentation/UIKit/UITableViewDelegate/tableView(_:viewForFooterInSection:)) method of your delegate object, call the table view’s [`dequeueReusableHeaderFooterView(withIdentifier:)`](/documentation/UIKit/UITableView/dequeueReusableHeaderFooterView(withIdentifier:)) method to create your view. That method returns a recycled view (if one is available) or creates a new view using the information you registered.

A simple alternative to creating custom header-footer views is to implement the [`tableView(_:titleForHeaderInSection:)`](/documentation/UIKit/UITableViewDataSource/tableView(_:titleForHeaderInSection:)) and [`tableView(_:titleForFooterInSection:)`](/documentation/UIKit/UITableViewDataSource/tableView(_:titleForFooterInSection:)) methods of your data source object. When you implement those methods, the table view creates a standard header or footer view and displays the text you supply.

## Topics

### Creating the view

[`init(reuseIdentifier:)`](/documentation/UIKit/UITableViewHeaderFooterView/init(reuseIdentifier:))

Initializes a header-footer view with the specified reuse identifier.

[`init(coder:)`](/documentation/UIKit/UITableViewHeaderFooterView/init(coder:))

Creates a header-footer view from data in an unarchiver.

### Managing view reuse

[`reuseIdentifier`](/documentation/UIKit/UITableViewHeaderFooterView/reuseIdentifier)

A string used to identify a reusable header or footer.

[`prepareForReuse()`](/documentation/UIKit/UITableViewHeaderFooterView/prepareForReuse())

Prepares a reusable header or footer view for reuse by the table.

### Configuring the background

[`defaultBackgroundConfiguration()`](/documentation/UIKit/UITableViewHeaderFooterView/defaultBackgroundConfiguration())

Retrieves a background configuration with system default values.

[`backgroundConfiguration`](/documentation/UIKit/UITableViewHeaderFooterView/backgroundConfiguration-52wng)

The current background configuration of the view.

[`defaultBackgroundConfiguration`](/documentation/UIKit/UITableViewHeaderFooterView/defaultBackgroundConfiguration)

Retrieves a background configuration with system default values.

[`backgroundConfiguration`](/documentation/UIKit/UITableViewHeaderFooterView/backgroundConfiguration-2o8ke)

The current background configuration of the view.

[`automaticallyUpdatesBackgroundConfiguration`](/documentation/UIKit/UITableViewHeaderFooterView/automaticallyUpdatesBackgroundConfiguration)

A Boolean value that determines whether the view automatically updates its background configuration when its state changes.

[`backgroundView`](/documentation/UIKit/UITableViewHeaderFooterView/backgroundView)

The background view of the header or footer.

### Managing the content

[`defaultContentConfiguration()`](/documentation/UIKit/UITableViewHeaderFooterView/defaultContentConfiguration())

Retrieves a default list content configuration for the view’s style.

[`contentConfiguration`](/documentation/UIKit/UITableViewHeaderFooterView/contentConfiguration-6b4eg)

The current content configuration of the view.

[`defaultContentConfiguration`](/documentation/UIKit/UITableViewHeaderFooterView/defaultContentConfiguration)

Retrieves a default list content configuration for the view’s style.

[`contentConfiguration`](/documentation/UIKit/UITableViewHeaderFooterView/contentConfiguration-r49e)

The current content configuration of the view.

[`automaticallyUpdatesContentConfiguration`](/documentation/UIKit/UITableViewHeaderFooterView/automaticallyUpdatesContentConfiguration)

A Boolean value that determines whether the view automatically updates its content configuration when its state changes.

[`contentView`](/documentation/UIKit/UITableViewHeaderFooterView/contentView)

The content view of the header or footer.

### Managing the state

[`configurationState`](/documentation/UIKit/UITableViewHeaderFooterView/configurationState-7xj7r)

The current configuration state of the view.

[`configurationState`](/documentation/UIKit/UITableViewHeaderFooterView/configurationState-9l60r)

The current configuration state of the view.

[`setNeedsUpdateConfiguration()`](/documentation/UIKit/UITableViewHeaderFooterView/setNeedsUpdateConfiguration())

Informs the view to update its configuration for its current state.

[`updateConfiguration(using:)`](/documentation/UIKit/UITableViewHeaderFooterView/updateConfiguration(using:))

Updates the view’s configuration using the current state.

[`configurationUpdateHandler`](/documentation/UIKit/UITableViewHeaderFooterView/configurationUpdateHandler-49slo)

A block for handling updates to the view’s configuration using the current state.

[`UITableViewHeaderFooterView.ConfigurationUpdateHandler`](/documentation/UIKit/UITableViewHeaderFooterView/ConfigurationUpdateHandler-swift.typealias)

The type of block for handling updates to the view’s configuration using the current state.

[`updateConfigurationUsingState:`](/documentation/UIKit/UITableViewHeaderFooterView/updateConfigurationUsingState:)

Updates the view’s configuration using the current state.

[`configurationUpdateHandler`](/documentation/UIKit/UITableViewHeaderFooterView/configurationUpdateHandler-3oji2)

A block for handling updates to the view’s configuration using the current state.

[`UITableViewHeaderFooterViewConfigurationUpdateHandler`](/documentation/UIKit/UITableViewHeaderFooterViewConfigurationUpdateHandler)

The type of block for handling updates to the view’s configuration using the current state.

### Deprecated

[`textLabel`](/documentation/UIKit/UITableViewHeaderFooterView/textLabel)

A primary text label for the view.

[`detailTextLabel`](/documentation/UIKit/UITableViewHeaderFooterView/detailTextLabel)

A detail text label for the view.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)