<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICollectionViewCellRegistration",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UICollectionViewCellRegistration"
  },
  "title" : "UICollectionViewCellRegistration"
}
-->

# UICollectionViewCellRegistration

A registration for the collection view’s cells.

```
@interface UICollectionViewCellRegistration : NSObject
```

## Overview

Use a cell registration to register cells with your collection view and configure each cell for display. You create a cell registration with your cell type and data item type as the registration’s generic parameters, passing in a registration handler to configure the cell. In the registration handler, you specify how to configure the content and appearance of that type of cell.

The following example creates a cell registration for cells of type [`UICollectionViewListCell`](/documentation/UIKit/UICollectionViewListCell). It creates a content configuration with a system default style, customizes the content and appearance of the configuration, and then assigns the configuration to the cell.

```objc
UICollectionViewCellRegistration *cellRegistration = [UICollectionViewCellRegistration registrationWithCellClass:[UICollectionViewListCell class] configurationHandler:^(UICollectionViewListCell *cell, NSIndexPath *indexPath, id item) {
    UIListContentConfiguration *contentConfiguration = cell.defaultContentConfiguration;
    
    contentConfiguration.text = [NSString stringWithFormat:@"%@", item];
    contentConfiguration.textProperties.color = UIColor.lightGrayColor;
    
    cell.contentConfiguration = contentConfiguration;
}];
```

After you create a cell registration, you pass it in to [`dequeueConfiguredReusableCellWithRegistration:forIndexPath:item:`](/documentation/UIKit/UICollectionView/dequeueConfiguredReusableCellWithRegistration:forIndexPath:item:), which you call from your data source’s cell provider.

```objc
self.dataSource = [[UICollectionViewDiffableDataSource alloc] initWithCollectionView:self.collectionView cellProvider:^UICollectionViewCell *(UICollectionView *collectionView, NSIndexPath *indexPath, id item) {
    return [collectionView dequeueConfiguredReusableCellWithRegistration:cellRegistration forIndexPath:indexPath item:item];
}];
```

You don’t need to call [`register(_:forCellWithReuseIdentifier:)`](/documentation/UIKit/UICollectionView/register(_:forCellWithReuseIdentifier:)-6z6t4) or [`register(_:forCellWithReuseIdentifier:)`](/documentation/UIKit/UICollectionView/register(_:forCellWithReuseIdentifier:)-3vaho). The collection view registers your cell automatically when you pass the cell registration to [`dequeueConfiguredReusableCellWithRegistration:forIndexPath:item:`](/documentation/UIKit/UICollectionView/dequeueConfiguredReusableCellWithRegistration:forIndexPath:item:).

> Important:
> Don’t create your cell registration inside a ``doc://com.apple.uikit/documentation/UIKit/UICollectionViewDiffableDataSourceReferenceCellProvider`` closure; doing so prevents cell reuse, and generates an exception in iOS 15 and higher.

## Topics

### Creating a cell registration

[`registrationWithCellClass:configurationHandler:`](/documentation/UIKit/UICollectionViewCellRegistration/registrationWithCellClass:configurationHandler:)

Creates a cell registration with the specified registration handler.

[`registrationWithCellNib:configurationHandler:`](/documentation/UIKit/UICollectionViewCellRegistration/registrationWithCellNib:configurationHandler:)

Creates a cell registration with the specified registration handler and nib file.

[`UICollectionViewCellRegistrationConfigurationHandler`](/documentation/UIKit/UICollectionViewCellRegistrationConfigurationHandler)

A closure that handles the cell registration and configuration.

### Querying a cell registration

[`configurationHandler`](/documentation/UIKit/UICollectionViewCellRegistration/configurationHandler)

The closure that handles the cell registration and configuration.

[`cellClass`](/documentation/UIKit/UICollectionViewCellRegistration/cellClass)

The class associated with the cell.

[`cellNib`](/documentation/UIKit/UICollectionViewCellRegistration/cellNib)

The nib file associated with the cell.



---

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)