Instance Method

findString:fromSelection:withOptions:

Synchronously finds the next occurance of a string after the specified selection (or before the selection if you specified NSBackwardsSearch as a search option.

Declaration

- (PDFSelection *)findString:(NSString *)string fromSelection:(PDFSelection *)selection withOptions:(NSStringCompareOptions)options;

Discussion

Matches are returned as a PDFSelection object. If the search reaches the end (or beginning) of the document without any hits, this method returns NULL.

If you pass NULL for the selection, this method begins searching from the beginning of the document (or the end, if you specified NSBackwardsSearch).

You can use this method to implement “Find Again” behavior. For options, refer to Searching, Comparing, and Sorting Strings.

See Also

Searching Documents

- findString:withOptions:

Synchronously finds all instances of the specified string in the document.

- beginFindString:withOptions:

Asynchronously finds all instances of the specified string in the document.

- beginFindStrings:withOptions:

Asynchronously finds all instances of the specified array of strings in the document.

isFinding

Returns a Boolean value indicating whether an asynchronous find operation is in progress.

- cancelFindString

Cancels a search initiated with beginFindString:withOptions:.