---
title: "animationShouldStart(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsanimationdelegate/animationshouldstart(_:)"
---

# animationShouldStart(_:)

Sent to the delegate just after an animation is started.

## Declaration

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

## Parameters

- `animation`: The NSAnimation object that was just started.

## Return Value

Return Value false to cancel the animation, true to have the animation proceed.

## Discussion

Discussion The delegate is sent this message just after animation receives a start() message. The delegate can use this method to prepare objects and resources for the effect.

## See Also

### Controlling and Monitoring an Animation

- [animationDidEnd(_:)](appkit/nsanimationdelegate/animationdidend(_:).md)
- [animationDidStop(_:)](appkit/nsanimationdelegate/animationdidstop(_:).md)
- [animation(_:valueForProgress:)](appkit/nsanimationdelegate/animation(_:valueforprogress:).md)
