<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuickLookUI",
  "identifier" : "/documentation/QuickLookUI/QLPreviewView/init(frame:style:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Quick Look UI"
    ],
    "preciseIdentifier" : "c:objc(cs)QLPreviewView(im)initWithFrame:style:"
  },
  "title" : "init(frame:style:)"
}
-->

# init(frame:style:)

Creates a preview view with the provided frame and style.

```
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 [`QLPreviewViewStyle`](/documentation/QuickLookUI/QLPreviewViewStyle).

## Return Value

Returns a `QLPreviewView` object with the designated frame and style.

## Discussion

This is the designated initializer for the `QLPreviewView` class.

---

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)