---
title: "init(frame:isPreview:)"
framework: Screen Saver
role: symbol
role_heading: Initializer
platforms: [macOS 10.0+]
path: "screensaver/screensaverview/init(frame:ispreview:)"
---

# init(frame:isPreview:)

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

## Declaration

```swift
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

Discussion The screen saver application installs the new view object into the view hierarchy of an NSWindow before the animation begins. This method is the designated initializer for the ScreenSaverView class. Returns self.
