<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITableView/register(_:forCellReuseIdentifier:)-5q6bo",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UITableView(im)registerNib:forCellReuseIdentifier:"
  },
  "title" : "register(_:forCellReuseIdentifier:)"
}
-->

# register(_:forCellReuseIdentifier:)

Registers a nib object that contains a cell with the table view under a specified identifier.

```
func register(_ nib: UINib?, forCellReuseIdentifier identifier: String)
```

## Parameters

`nib`

A nib object that specifies the nib file to use to create the cell.

`identifier`

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

## Discussion

Before dequeueing any cells, call this method or the [`register(_:forCellReuseIdentifier:)`](/documentation/UIKit/UITableView/register(_:forCellReuseIdentifier:)-3l3ct) 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 nib you specify in the `nib` parameter replaces the old entry. You may specify `nil` for `nib` if you want to unregister the nib from the specified reuse identifier.

## See Also

[`tableView(_:cellForRowAt:)`](/documentation/UIKit/UITableViewDataSource/tableView(_:cellForRowAt:))

Asks the data source for a cell to insert in a particular location of the table view.



---

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)