---
title: rotation()
framework: pdfkit
role: symbol
role_heading: Instance Method
path: pdfkit/pdfannotationtextwidget/rotation()
---

# rotation()

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

## Declaration

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

## Return Value

Return Value The rotation angle of the annotation text field in degrees.

## Discussion

Discussion Note that the rotation value is a positive multiple of 90, such as 0, 90, 180, or 270. The rotation of annotation text fields with negative rotation is converted to a corresponding positive rotation. 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)
- [setRotation(_:)](pdfkit/pdfannotationtextwidget/setrotation(_:).md)
