<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextView/toggleQuickLookPreviewPanel(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextView(im)toggleQuickLookPreviewPanel:"
  },
  "title" : "toggleQuickLookPreviewPanel(_:)"
}
-->

# toggleQuickLookPreviewPanel(_:)

An action message that toggles the visibility state of the Quick Look preview panel.

```
@IBAction func toggleQuickLookPreviewPanel(_ sender: Any?)
```

## Parameters

`sender`

The message sender.

## Discussion

This action message toggles the visibility state of the Quick Look preview panel if the receiver is the current Quick Look controller.

---

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)