---
title: state()
framework: pdfkit
role: symbol
role_heading: Instance Method
path: pdfkit/pdfannotationbuttonwidget/state()
---

# state()

Returns the state of the control.

## Declaration

```swift
func state() -> Int
```

## Return Value

Return Value NSOnState if the control is on; NSOffState otherwise.

## See Also

### Getting and Setting the Control’s State

- [setState(_:)](pdfkit/pdfannotationbuttonwidget/setstate(_:).md)
