---
title: UICollectionViewCellRegistration
framework: uikit
role: symbol
role_heading: Class
path: uikit/uicollectionviewcellregistration
---

# UICollectionViewCellRegistration

A registration for the collection view’s cells.

## Declaration

```occ
@interface UICollectionViewCellRegistration : NSObject
```

## Overview

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. 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. 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:, which you call from your data source’s cell provider. 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:) or register(_:forCellWithReuseIdentifier:). The collection view registers your cell automatically when you pass the cell registration to dequeueConfiguredReusableCellWithRegistration:forIndexPath:item:. important: Don’t create your cell registration inside a UICollectionViewDiffableDataSourceReferenceCellProvider closure; doing so prevents cell reuse, and generates an exception in iOS 15 and higher.

## Topics

### Creating a cell registration

- [registrationWithCellClass:configurationHandler:](uikit/uicollectionviewcellregistration/registrationwithcellclass:configurationhandler:.md)
- [registrationWithCellNib:configurationHandler:](uikit/uicollectionviewcellregistration/registrationwithcellnib:configurationhandler:.md)
- [UICollectionViewCellRegistrationConfigurationHandler](uikit/uicollectionviewcellregistrationconfigurationhandler.md)

### Querying a cell registration

- [configurationHandler](uikit/uicollectionviewcellregistration/configurationhandler.md)
- [cellClass](uikit/uicollectionviewcellregistration/cellclass.md)
- [cellNib](uikit/uicollectionviewcellregistration/cellnib.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

## See Also

### Creating cells

- [dequeueConfiguredReusableCellWithRegistration:forIndexPath:item:](uikit/uicollectionview/dequeueconfiguredreusablecellwithregistration:forindexpath:item:.md)
- [register(_:forCellWithReuseIdentifier:)](uikit/uicollectionview/register(_:forcellwithreuseidentifier:)-3vaho.md)
- [register(_:forCellWithReuseIdentifier:)](uikit/uicollectionview/register(_:forcellwithreuseidentifier:)-6z6t4.md)
- [dequeueReusableCell(withReuseIdentifier:for:)](uikit/uicollectionview/dequeuereusablecell(withreuseidentifier:for:).md)
