---
title: QLPreviewingController
framework: QuickLook UI
role: symbol
role_heading: Protocol
platforms: [macOS 12.0+]
path: quicklookui/qlpreviewingcontroller
---

# QLPreviewingController

A protocol for implementing a custom controller to create previews of files.

## Declaration

```swift
protocol QLPreviewingController : NSObjectProtocol
```

## Overview

Overview A controller that implements the QLPreviewingController protocol must at least implement preparePreviewOfSearchableItem(identifier:queryString:completionHandler:) or preparePreviewOfFile(at:completionHandler:).

## Topics

### Instance Methods

- [preparePreviewOfFile(at:completionHandler:)](quicklookui/qlpreviewingcontroller/preparepreviewoffile(at:completionhandler:).md)
- [preparePreviewOfSearchableItem(identifier:queryString:completionHandler:)](quicklookui/qlpreviewingcontroller/preparepreviewofsearchableitem(identifier:querystring:completionhandler:).md)
- [providePreview(for:completionHandler:)](quicklookui/qlpreviewingcontroller/providepreview(for:completionhandler:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
