<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICollectionViewCell/configurationUpdateHandler-ajhn",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UICollectionViewCell(py)configurationUpdateHandler"
  },
  "title" : "configurationUpdateHandler"
}
-->

# configurationUpdateHandler

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

```
@property (nonatomic, copy, nullable) UICollectionViewCellConfigurationUpdateHandler configurationUpdateHandler;
```

## Discussion

A configuration update handler provides an alternative approach to overriding [`updateConfigurationUsingState:`](/documentation/UIKit/UICollectionViewCell/updateConfigurationUsingState:) in a subclass. Set a configuration update handler to update the cell’s configuration using the new state in response to a configuration state change:

```objc
[cell setConfigurationUpdateHandler:^(UICollectionViewCell *cell, UICellConfigurationState *state) {
    UIListContentConfiguration *content = [[UIListContentConfiguration cellConfiguration] updatedConfigurationForState:state];
    [content setText: @"Hello world!"];
    if (state.isDisabled) {
        [content.textProperties setColor:[UIColor systemGrayColor]];
    }
    [cell setContentConfiguration:content];
}];
```

Setting the value of this property calls [`setNeedsUpdateConfiguration()`](/documentation/UIKit/UICollectionViewCell/setNeedsUpdateConfiguration()). The system calls this handler after calling [`updateConfigurationUsingState:`](/documentation/UIKit/UICollectionViewCell/updateConfigurationUsingState:).

In iOS 18 and later, UIKit supports automatic trait tracking inside this block for traits from this cell’s `traitCollection`. For more information, see [Automatic trait tracking](/documentation/UIKit/automatic-trait-tracking).

This closure supports automatic observation tracking. For more information, see [Updating views automatically with observation tracking in UIKit](/documentation/UIKit/updating-views-automatically-with-observation-tracking-in-uikit).

---

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)