---
title: "setRotation(_:)"
framework: pdfkit
role: symbol
role_heading: Instance Method
path: "pdfkit/pdfannotationtextwidget/setrotation(_:)"
---

# setRotation(_:)

Sets the rotation angle of the annotation text field in degrees.

## Declaration

```swift
func setRotation(_ rotation: Int32)
```

## Parameters

- `rotation`: The rotation angle to be applied to the annotation text field, in degrees. The rotation angle must be a positive or negative multiple of 90 (negative angles are converted to their positive equivalents; for example -90 is changed to 270).

## See Also

### Related Documentation

- [PDFAnnotationTextWidget](pdfkit/pdfannotationtextwidget.md)

### Managing Background Color, Alignment, and Rotation

- [backgroundColor()](pdfkit/pdfannotationtextwidget/backgroundcolor().md)
- [setBackgroundColor(_:)](pdfkit/pdfannotationtextwidget/setbackgroundcolor(_:).md)
- [alignment()](pdfkit/pdfannotationtextwidget/alignment().md)
- [setAlignment(_:)](pdfkit/pdfannotationtextwidget/setalignment(_:).md)
- [rotation()](pdfkit/pdfannotationtextwidget/rotation().md)
