---
title: "setState(_:)"
framework: pdfkit
role: symbol
role_heading: Instance Method
path: "pdfkit/pdfannotationbuttonwidget/setstate(_:)"
---

# setState(_:)

Sets the state of the control.

## Declaration

```swift
func setState(_ value: Int)
```

## Parameters

- `value`: The state the control should be in.

## Discussion

Discussion A control’s state (for example, checked or unchecked) affects how it is drawn. Note that push buttons are always in the on state.

## See Also

### Getting and Setting the Control’s State

- [state()](pdfkit/pdfannotationbuttonwidget/state().md)
