---
title: "setPreviewState(_:)"
framework: quartz
role: symbol
role_heading: Instance Method
path: "quartz/ikfilterbrowserview/setpreviewstate(_:)"
---

# setPreviewState(_:)

Sets the preview state.

## Declaration

```swift
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

Discussion Use this method to show and hide the preview programmatically.
