<!--
{
  "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/UITableView/dequeueReusableHeaderFooterView(withIdentifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UITableView(im)dequeueReusableHeaderFooterViewWithIdentifier:"
  },
  "title" : "dequeueReusableHeaderFooterView(withIdentifier:)"
}
-->

# dequeueReusableHeaderFooterView(withIdentifier:)

Returns a reusable header or footer view after locating it by its identifier.

```
func dequeueReusableHeaderFooterView(withIdentifier identifier: String) -> UITableViewHeaderFooterView?
```

## Parameters

`identifier`

A string identifying the header or footer view to be reused. This parameter must not be `nil`.

## Return Value

A [`UITableViewHeaderFooterView`](/documentation/UIKit/UITableViewHeaderFooterView) object with the associated identifier or `nil` if no such object exists in the reusable view queue.

## Discussion

For performance reasons, a table view’s delegate should generally reuse [`UITableViewHeaderFooterView`](/documentation/UIKit/UITableViewHeaderFooterView) objects when it’s asked to provide them. A table view maintains a queue or list of [`UITableViewHeaderFooterView`](/documentation/UIKit/UITableViewHeaderFooterView) objects that the table view’s delegate has marked for reuse. It marks a view for reuse by assigning it a reuse identifier when it creates it (in the [`init(reuseIdentifier:)`](/documentation/UIKit/UITableViewHeaderFooterView/init(reuseIdentifier:)) method of [`UITableViewHeaderFooterView`](/documentation/UIKit/UITableViewHeaderFooterView)).

You can use this method to access specific template header and footer views that you previously created. You can access a view’s reuse identifier through its [`reuseIdentifier`](/documentation/UIKit/UITableViewHeaderFooterView/reuseIdentifier) property.

---

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)