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

# dequeueReusableCell(withIdentifier:for:)

Returns a reusable table-view cell object for the specified reuse identifier and adds it to the table.

```
func dequeueReusableCell(withIdentifier identifier: String, for indexPath: IndexPath) -> UITableViewCell
```

## Parameters

`identifier`

A string identifying the cell object to be reused. This parameter must not be `nil`.

`indexPath`

The index path specifying the location of the cell. Always specify the index path provided to you by your data source object. This method uses the index path to perform additional configuration based on the cell’s position in the table view.

## Return Value

A [`UITableViewCell`](/documentation/UIKit/UITableViewCell) object with the associated reuse identifier. This method always returns a valid cell.

## Discussion

Call this method only from the [`tableView(_:cellForRowAt:)`](/documentation/UIKit/UITableViewDataSource/tableView(_:cellForRowAt:)) method of your table view data source object. This method returns an existing cell of the specified type, if one is available, or it creates and returns a new cell using the class or storyboard you provided earlier. Don’t call this method outside of your data source’s [`tableView(_:cellForRowAt:)`](/documentation/UIKit/UITableViewDataSource/tableView(_:cellForRowAt:)) method. If you need to create cells at other times, call [`dequeueReusableCell(withIdentifier:)`](/documentation/UIKit/UITableView/dequeueReusableCell(withIdentifier:)) instead.

> Important:
> You must specify a cell with a matching identifier in your storyboard file. You may also register a class or nib file using the ``doc://com.apple.uikit/documentation/UIKit/UITableView/register(_:forCellReuseIdentifier:)-5q6bo`` or ``doc://com.apple.uikit/documentation/UIKit/UITableView/register(_:forCellReuseIdentifier:)-3l3ct`` method, but must do so before calling this method.

When creating new cells from your storyboard or nib file, this method loads the cell object and initializes it using its [`init(coder:)`](/documentation/UIKit/UITableView/init(coder:)) method. When creating cells from a registered class, this method creates the cell and initializes it by calling its [`init(style:reuseIdentifier:)`](/documentation/UIKit/UITableViewCell/init(style:reuseIdentifier:)) method. For nib-based cells, this method loads the cell object from the provided nib file. If an existing cell was available for reuse, this method calls the cell’s [`prepareForReuse()`](/documentation/UIKit/UITableViewCell/prepareForReuse()) method instead.

---

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)