<!--
{
  "availability" : [
    "macOS: 10.11.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCollectionViewTransitionLayout/updateValue(_:forAnimatedKey:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCollectionViewTransitionLayout(im)updateValue:forAnimatedKey:"
  },
  "title" : "updateValue(_:forAnimatedKey:)"
}
-->

# updateValue(_:forAnimatedKey:)

Sets the value of a key whose value you use during the animation.

```
func updateValue(_ value: CGFloat, forAnimatedKey key: NSCollectionViewTransitionLayout.AnimatedKey)
```

## Parameters

`value`

The value of the key.

`key`

The key that you define for your custom transition layout.

## Discussion

Use this method to update the value of a specific key that you use in your custom transition layout.

---

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)