Instance Method

annotationAtPoint:

Returns the annotation, if there is one, at the specified point.

Declaration

iOS, Mac Catalyst
- (PDFAnnotation *)annotationAtPoint:(CGPoint)point;
macOS
- (PDFAnnotation *)annotationAtPoint:(NSPoint)point;

Discussion

Use this method for hit-testing based on the current cursor position. If more than one annotation shares the specified point, the frontmost (or topmost) one is returned (the annotations are searched in reverse order of their appearance in the PDF data file). Returns NULL if there is no annotation at point.

Specify the point in page space. Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.

See Also

Working with Annotations

annotations

Returns an array containing the page’s annotations.

displaysAnnotations

Returns a Boolean value indicating whether annotations are displayed for the page.

- addAnnotation:

Adds the specified annotation object to the page.

- removeAnnotation:

Removes the specified annotation from the page.