<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuartzCore",
  "identifier" : "/documentation/QuartzCore/CAAnimationDelegate/animationDidStop(_:finished:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:objc(pl)CAAnimationDelegate(im)animationDidStop:finished:"
  },
  "title" : "animationDidStop(_:finished:)"
}
-->

# animationDidStop(_:finished:)

Tells the delegate the animation has ended.

```
optional func animationDidStop(_ anim: CAAnimation, finished flag: Bool)
```

## Parameters

`anim`

The [`CAAnimation`](/documentation/QuartzCore/CAAnimation) object that has ended.

`flag`

A flag indicating whether the animation has completed by reaching the end of its duration.

## Discussion

The animation may have ended because it has completed its active duration or because it has been removed from the layer it is attached to. `flag` is true if the animation reached the end of its duration without being removed.

---

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)