---
title: ScreenSaverView
framework: Screen Saver
role: symbol
role_heading: Class
platforms: [macOS 10.0+]
path: screensaver/screensaverview
---

# ScreenSaverView

An abstract class that defines the interface for subclassers to interact with the screen saver infrastructure.

## Declaration

```swift
class ScreenSaverView
```

## Overview

Overview ScreenSaverView provides the interface for your screen saver, including the content you animate onscreen and an optional configuration sheet. Create your own custom subclass and add it to your screen saver bundle. Use your subclass to create the animations that you want to appear onscreen, and to specify additional animation details. note: When someone previews your screen saver in System Preferences, the system instantiates your ScreenSaverView subclass. You can draw from your view’s draw(_:) method, or you can draw directly from the animateOneFrame() method. If you prefer to use the draw(_:) method, use the animateOneFrame() method to call the setNeedsDisplay(_:) method and specify the portions of your view that require updates.

## Topics

### Creating a screen saver view

- [init(frame:isPreview:)](screensaver/screensaverview/init(frame:ispreview:).md)

### Getting the preferred window behavior

- [backingStoreType()](screensaver/screensaverview/backingstoretype().md)
- [performGammaFade()](screensaver/screensaverview/performgammafade().md)

### Setting and getting the animation time interval

- [animationTimeInterval](screensaver/screensaverview/animationtimeinterval.md)

### Animating the screen saver

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

### Drawing the view

- [draw(_:)](screensaver/screensaverview/draw(_:).md)
- [isPreview](screensaver/screensaverview/ispreview.md)

### Accessing the configuration sheet

- [hasConfigureSheet](screensaver/screensaverview/hasconfiguresheet.md)
- [configureSheet](screensaver/screensaverview/configuresheet.md)

## Relationships

### Inherits From

- [NSView](appkit/nsview.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSAccessibilityElementProtocol](appkit/nsaccessibilityelementprotocol.md)
- [NSAccessibilityProtocol](appkit/nsaccessibilityprotocol.md)
- [NSAnimatablePropertyContainer](appkit/nsanimatablepropertycontainer.md)
- [NSAppearanceCustomization](appkit/nsappearancecustomization.md)
- [NSCoding](foundation/nscoding.md)
- [NSDraggingDestination](appkit/nsdraggingdestination.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSStandardKeyBindingResponding](appkit/nsstandardkeybindingresponding.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [NSUserActivityRestoring](appkit/nsuseractivityrestoring.md)
- [NSUserInterfaceItemIdentification](appkit/nsuserinterfaceitemidentification.md)

## See Also

### Interface

- [ScreenSaverDefaults](screensaver/screensaverdefaults.md)
