---
title: "setCanControlQuickLookPanel(_:)"
framework: quartz
role: symbol
role_heading: Instance Method
path: "quartz/ikimagebrowserview/setcancontrolquicklookpanel(_:)"
---

# setCanControlQuickLookPanel(_:)

Specifies whether the view can automatically take control of the QuickLook panel.

## Declaration

```swift
func setCanControlQuickLookPanel(_ flag: Bool)
```

## Parameters

- `flag`: doc://com.apple.documentation/documentation/Swift/true, if the view can display the QuickLook panel, otherwise doc://com.apple.documentation/documentation/Swift/false.

## Discussion

Discussion When the browser view displays the QuickLook panel it sets itself as the QuickLook datasource. If the browser cells returned by the datasource return items that are URLs or paths, then the QuickLook panel will display the image at that location. Otherwise, the browser cell must implement the QLPreviewItem protocol and return the requested URL for the custom cell.

## See Also

### QuickLook Support

- [canControlQuickLookPanel()](quartz/ikimagebrowserview/cancontrolquicklookpanel().md)
