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

# init(frame:isPreview:)

Creates a newly allocated screen saver view with the specified frame rectangle and preview information.

```
init?(frame: NSRect, isPreview: Bool)
```

## Parameters

`frame`

The frame rectangle for the view.

`isPreview`

<doc://com.apple.documentation/documentation/Swift/true> if this view provides a preview for system settings, or <doc://com.apple.documentation/documentation/Swift/false> if the system fills the screen with your view’s contents.

## Discussion

The screen saver application installs the new view object into the view hierarchy of an <doc://com.apple.documentation/documentation/AppKit/NSWindow> before the animation begins. This method is the designated initializer for the [`ScreenSaverView`](/documentation/ScreenSaver/ScreenSaverView) class. Returns `self`.

---

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)