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

# setPreviewState(_:)

Sets the preview state.

```
func setPreviewState(_ inState: Bool)
```

## Parameters

`inState`

A state (<doc://com.apple.documentation/documentation/Swift/true> or <doc://com.apple.documentation/documentation/Swift/false>) that represents whether a preview is visible.

## Discussion

Use this method to show and hide the preview programmatically.

---

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)