<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuartzCore",
  "identifier" : "/documentation/QuartzCore/CATransaction/animationDuration()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:objc(cs)CATransaction(cm)animationDuration"
  },
  "title" : "animationDuration()"
}
-->

# animationDuration()

Returns the animation duration used by all animations within this transaction group.

```
class func animationDuration() -> CFTimeInterval
```

## Return Value

An interval of time used as the duration.

## Discussion

You can retrieve the animation duration for a specific transaction by calling the [`value(forKey:)`](/documentation/QuartzCore/CATransaction/value(forKey:)) method of the transaction object and asking for the [`kCATransactionAnimationDuration`](/documentation/QuartzCore/kCATransactionAnimationDuration) key.

---

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)