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

# prepareForReuse()

Prepares a reusable cell for reuse by the table view’s delegate.

```
func prepareForReuse()
```

## Discussion

If a [`UITableViewCell`](/documentation/UIKit/UITableViewCell) object has a reuse identifier, the table view invokes this method just before returning the object from the `UITableView` method [`dequeueReusableCell(withIdentifier:)`](/documentation/UIKit/UITableView/dequeueReusableCell(withIdentifier:)). To avoid potential performance issues, you should only reset attributes of the cell that are not related to content, for example, alpha, editing, and selection state. The table view’s delegate in [`tableView(_:cellForRowAt:)`](/documentation/UIKit/UITableViewDataSource/tableView(_:cellForRowAt:)) should *always* reset all content when reusing a cell.

The table view doesn’t call this method if the cell object doesn’t have an associated reuse identifier, or if you use [`reconfigureRows(at:)`](/documentation/UIKit/UITableView/reconfigureRows(at:)) to update the contents of an existing cell.

If you override this method, you must be sure to invoke the superclass implementation.

## See Also

[`initWithFrame:reuseIdentifier:`](/documentation/UIKit/UITableViewCell/initWithFrame:reuseIdentifier:)

Initializes and returns a table cell object.



---

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)