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

# startAnimation()

Activates the periodic timer that animates the screen saver.

## Declaration

```swift
func startAnimation()
```

## Discussion

Discussion The system calls this method when it’s time for you to start animating your screen saver’s content. The system calls this method only once at the start of animations. Use this method to set up any initial state information you require or to allocate expensive resources. If you override this method, you must call the inherited implementation at some point.

## See Also

### Animating the screen saver

- [animateOneFrame()](screensaver/screensaverview/animateoneframe().md)
- [stopAnimation()](screensaver/screensaverview/stopanimation().md)
- [isAnimating](screensaver/screensaverview/isanimating.md)
