<!--
{
  "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/register(_:forCellReuseIdentifier:)-3l3ct",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UITableView(im)registerClass:forCellReuseIdentifier:"
  },
  "title" : "register(_:forCellReuseIdentifier:)"
}
-->

# register(_:forCellReuseIdentifier:)

Registers a class to use in creating new table cells.

```
func register(_ cellClass: AnyClass?, forCellReuseIdentifier identifier: String)
```

## Parameters

`cellClass`

The class of a cell that you want to use in the table (must be a [`UITableViewCell`](/documentation/UIKit/UITableViewCell) subclass).

`identifier`

The reuse identifier for the cell. This parameter must not be `nil` and must not be an empty string.

## Discussion

Prior to dequeueing any cells, call this method or the [`register(_:forCellReuseIdentifier:)`](/documentation/UIKit/UITableView/register(_:forCellReuseIdentifier:)-5q6bo) method to tell the table view how to create new cells. If a cell of the specified type isn’t currently in a reuse queue, the table view uses the provided information to create a new cell object automatically.

If you previously registered a class or nib file with the same reuse identifier, the class you specify in the `cellClass` parameter replaces the old entry. You may specify `nil` for `cellClass` if you want to unregister the class from the specified reuse identifier.

---

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)