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

# animationShouldStart(_:)

Sent to the delegate just after an animation is started.

```
nonisolated optional func animationShouldStart(_ animation: NSAnimation) -> Bool
```

## Parameters

`animation`

The `NSAnimation` object that was just started.

## Return Value

<doc://com.apple.documentation/documentation/Swift/false> to cancel the animation, <doc://com.apple.documentation/documentation/Swift/true> to have the animation proceed.

## Discussion

The delegate is sent this message just after `animation` receives a [`start()`](/documentation/AppKit/NSAnimation/start()) message. The delegate can use this method to prepare objects and resources for the effect.

---

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)