<!--
{
  "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/UICollectionViewCell",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UICollectionViewCell"
  },
  "title" : "UICollectionViewCell"
}
-->

# UICollectionViewCell

A single data item when that item is within the collection view’s visible bounds.

```
@MainActor class UICollectionViewCell
```

## Overview

You can use [`UICollectionViewCell`](/documentation/UIKit/UICollectionViewCell) as-is or subclass it to add additional properties and methods. The layout and presentation of cells is managed by the collection view and its corresponding layout object.

To configure the content and appearance of your cell, you can set its [`contentConfiguration`](/documentation/UIKit/UICollectionViewCell/contentConfiguration-13e7k) and [`backgroundConfiguration`](/documentation/UIKit/UICollectionViewCell/backgroundConfiguration-rgj4). Alternatively, add the views needed to present the data item’s content as subviews to the view in the [`contentView`](/documentation/UIKit/UICollectionViewCell/contentView) property. Don’t directly add subviews to the cell itself. The cell manages multiple layers of content, of which the content view is only one. In addition to the content view, the cell manages two background views that display the cell in its selected and unselected states.

You typically don’t create instances of this class yourself. Instead, you register your specific cell subclass (or a nib file containing a configured instance of your class) using a cell registration. When you want a new instance of your cell class, call the [`dequeueConfiguredReusableCell(using:for:item:)`](/documentation/UIKit/UICollectionView/dequeueConfiguredReusableCell(using:for:item:)) (Swift) or [`dequeueConfiguredReusableCellWithRegistration:forIndexPath:item:`](/documentation/UIKit/UICollectionView/dequeueConfiguredReusableCellWithRegistration:forIndexPath:item:) (Objective-C) method of the collection view object to retrieve one.

## Topics

### Configuring the background

[`defaultBackgroundConfiguration()`](/documentation/UIKit/UICollectionViewCell/defaultBackgroundConfiguration())

Retrieves a background configuration with system default values.

[`backgroundConfiguration`](/documentation/UIKit/UICollectionViewCell/backgroundConfiguration-rgj4)

The current background configuration of the cell.

[`defaultBackgroundConfiguration`](/documentation/UIKit/UICollectionViewCell/defaultBackgroundConfiguration)

Retrieves a background configuration with system default values.

[`backgroundConfiguration`](/documentation/UIKit/UICollectionViewCell/backgroundConfiguration-39dc0)

The current background configuration of the cell.

[`automaticallyUpdatesBackgroundConfiguration`](/documentation/UIKit/UICollectionViewCell/automaticallyUpdatesBackgroundConfiguration)

A Boolean value that determines whether the cell automatically updates its background configuration when its state changes.

[`backgroundView`](/documentation/UIKit/UICollectionViewCell/backgroundView)

The view that displays behind the cell’s other content.

[`selectedBackgroundView`](/documentation/UIKit/UICollectionViewCell/selectedBackgroundView)

The view that displays just above the background view for a selected cell.

### Managing the content

[`contentConfiguration`](/documentation/UIKit/UICollectionViewCell/contentConfiguration-13e7k)

The current content configuration of the cell.

[`contentConfiguration`](/documentation/UIKit/UICollectionViewCell/contentConfiguration-1lcqh)

The current content configuration of the cell.

[`automaticallyUpdatesContentConfiguration`](/documentation/UIKit/UICollectionViewCell/automaticallyUpdatesContentConfiguration)

A Boolean value that determines whether the cell automatically updates its content configuration when its state changes.

[`contentView`](/documentation/UIKit/UICollectionViewCell/contentView)

The main view that you add your cell’s custom content to.

### Managing the state

[`configurationState`](/documentation/UIKit/UICollectionViewCell/configurationState-4u37h)

The current configuration state of the cell.

[`configurationState`](/documentation/UIKit/UICollectionViewCell/configurationState-4269k)

The current configuration state of the cell.

[`setNeedsUpdateConfiguration()`](/documentation/UIKit/UICollectionViewCell/setNeedsUpdateConfiguration())

Informs the cell to update its configuration for its current state.

[`updateConfiguration(using:)`](/documentation/UIKit/UICollectionViewCell/updateConfiguration(using:))

Updates the cell’s configuration using the current state.

[`configurationUpdateHandler`](/documentation/UIKit/UICollectionViewCell/configurationUpdateHandler-7rqbu)

A block for handling updates to the cell’s configuration using the current state.

[`UICollectionViewCell.ConfigurationUpdateHandler`](/documentation/UIKit/UICollectionViewCell/ConfigurationUpdateHandler-swift.typealias)

The type of block for handling updates to the cell’s configuration using the current state.

[`updateConfigurationUsingState:`](/documentation/UIKit/UICollectionViewCell/updateConfigurationUsingState:)

Updates the cell’s configuration using the current state.

[`configurationUpdateHandler`](/documentation/UIKit/UICollectionViewCell/configurationUpdateHandler-ajhn)

A block for handling updates to the cell’s configuration using the current state.

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

The type of block for handling updates to the cell’s configuration using the current state.

[`isSelected`](/documentation/UIKit/UICollectionViewCell/isSelected)

The selection state of the cell.

[`isHighlighted`](/documentation/UIKit/UICollectionViewCell/isHighlighted)

The highlight state of the cell.

### Managing drag state changes

[`dragStateDidChange(_:)`](/documentation/UIKit/UICollectionViewCell/dragStateDidChange(_:))

Called when the drag state of the cell changes.

[`UICollectionViewCell.DragState`](/documentation/UIKit/UICollectionViewCell/DragState)

Constants indicating the current state of the drag operation.



---

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)