---
title: "class(forAnnotationType:)"
framework: pdfkit
role: symbol
role_heading: Instance Method
path: "pdfkit/pdfdocumentdelegate/class(forannotationtype:)"
---

# class(forAnnotationType:)

Returns a PDFAnnotation subclass for an annotation type.

## Declaration

```swift
optional func `class`(forAnnotationType annotationType: String) -> AnyClass
```

## Mentioned in

Adding Custom Graphics to a PDF

## See Also

### Wrapping Document Elements

- [classForPage()](pdfkit/pdfdocumentdelegate/classforpage().md)
- [class(forAnnotationClass:)](pdfkit/pdfdocumentdelegate/class(forannotationclass:).md)
