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

# onStateValue()

Returns the string associated with the on state of a radio button or checkbox control.

```
func onStateValue() -> String!
```

## Return Value

The string associated with the on state of a radio button or checkbox control.

## Discussion

This is a required string for controls of types [`PDFAnnotationButtonWidget`](/documentation/PDFKit/PDFAnnotationButtonWidget) and [`PDFAnnotationButtonWidget`](/documentation/PDFKit/PDFAnnotationButtonWidget). The off state is always labeled “Off”.

## See Also

[`PDFAnnotationButtonWidget`](/documentation/PDFKit/PDFAnnotationButtonWidget)

A `PDFAnnotationButtonWidget` object provides user interactivity on a page of a PDF document. There are three types of buttons available: push button, radio button, and checkbox.



---

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)