---
title: "init(frame:style:)"
framework: quicklookui
role: symbol
role_heading: Initializer
path: "quicklookui/qlpreviewview/init(frame:style:)"
---

# init(frame:style:)

Creates a preview view with the provided frame and style.

## Declaration

```swift
init!(frame: NSRect, style: QLPreviewViewStyle)
```

## Parameters

- `frame`: The frame rectangle for the initialized QLPreviewView object.
- `style`: The desired style for the QLPreviewView object. For a list of possible styles, see doc://com.apple.quicklookui/documentation/QuickLookUI/QLPreviewViewStyle.

## Return Value

Return Value Returns a QLPreviewView object with the designated frame and style.

## Discussion

Discussion This is the designated initializer for the QLPreviewView class.

## See Also

### Creating a Preview View

- [init(frame:)](quicklookui/qlpreviewview/init(frame:).md)
- [QLPreviewViewStyle](quicklookui/qlpreviewviewstyle.md)
