---
title: "dequeueReusableHeaderFooterView(withIdentifier:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitableview/dequeuereusableheaderfooterview(withidentifier:)"
---

# dequeueReusableHeaderFooterView(withIdentifier:)

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

## Declaration

```swift
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.

## Mentioned in

Adding headers and footers to table sections

## Return Value

Return Value A UITableViewHeaderFooterView object with the associated identifier or nil if no such object exists in the reusable view queue.

## Discussion

Discussion For performance reasons, a table view’s delegate should generally reuse UITableViewHeaderFooterView objects when it’s asked to provide them. A table view maintains a queue or list of 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:) method of 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 property.

## See Also

### Recycling section headers and footers

- [register(_:forHeaderFooterViewReuseIdentifier:)](uikit/uitableview/register(_:forheaderfooterviewreuseidentifier:)-1rgvc.md)
- [register(_:forHeaderFooterViewReuseIdentifier:)](uikit/uitableview/register(_:forheaderfooterviewreuseidentifier:)-20ybb.md)
