<!--
{
  "availability" : [
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ScreenSaver",
  "identifier" : "/documentation/ScreenSaver/ScreenSaverView/animateOneFrame()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Screen Saver"
    ],
    "preciseIdentifier" : "c:objc(cs)ScreenSaverView(im)animateOneFrame"
  },
  "title" : "animateOneFrame()"
}
-->

# animateOneFrame()

Advances the screen saver’s animation by a single frame.

```
func animateOneFrame()
```

## Discussion

The system calls this method each time the timer animating the screen saver fires. The time between calls to this method is always at least [`animationTimeInterval`](/documentation/ScreenSaver/ScreenSaverView/animationTimeInterval). The system locks focus on your view before it calls this method, so you can use this method to draw content. You can also let [`draw(_:)`](/documentation/ScreenSaver/ScreenSaverView/draw(_:)) perform the drawing, in which case you use this method to call <doc://com.apple.documentation/documentation/AppKit/NSView/setNeedsDisplay(_:)> to mark your view as dirty. The default implementation of this method does nothing.

---

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)