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

# setCaption(_:)

Sets the text of the label on a push button control.

## Declaration

```swift
func setCaption(_ name: String!)
```

## Parameters

- `name`: The text to be used as the label on a push button control.

## See Also

### Related Documentation

- [PDFAnnotationButtonWidget](pdfkit/pdfannotationbuttonwidget.md)

### Getting and Setting the Control Label Text

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