Instance Method

selectionForWordAtPoint:

Returns the whole word that includes the specified point.

Declaration

iOS, Mac Catalyst
- (PDFSelection *)selectionForWordAtPoint:(CGPoint)point;
macOS
- (PDFSelection *)selectionForWordAtPoint:(NSPoint)point;

Discussion

Returns NULL if no word contains point.

Use this method to respond to a double-click.

See Also

Working with Selections

- selectionForRect:

Returns the text enclosed within the specified rectangle, expressed in page (user) coordinates.

- selectionForLineAtPoint:

Returns the whole line of text that includes the specified point.

- selectionFromPoint:toPoint:

Returns the text between the two specified points in page space.

- selectionForRange:

Returns the text contained within the specified range.