---
title: stopAnimation()
framework: Screen Saver
role: symbol
role_heading: Instance Method
platforms: [macOS 10.0+]
path: screensaver/screensaverview/stopanimation()
---

# stopAnimation()

Deactivates the timer that advances the animation.

## Declaration

```swift
func stopAnimation()
```

## Discussion

Discussion The system calls this method when it’s time for you to stop animating your screen saver’s content. The system calls this method only once at the end of animations. Use this method to unload expensive resources or to reset your screen saver to a known state. If you override this method, you must call the inherited implementation at some point.

## See Also

### Animating the screen saver

- [startAnimation()](screensaver/screensaverview/startanimation().md)
- [animateOneFrame()](screensaver/screensaverview/animateoneframe().md)
- [isAnimating](screensaver/screensaverview/isanimating.md)
