Contents

performTextSearchWithQueryString:usingOptions:resultAggregator:

Searches for ranges of text matching the string across all searchable documents and collects results in the aggregator.

Declaration

- (void) performTextSearchWithQueryString:(NSString *) string usingOptions:(UITextSearchOptions *) options resultAggregator:(id<UITextSearchAggregator>) aggregator;

Parameters

  • string:

    The string to search for.

  • options:

    The configurable options to use for matching words and comparing strings.

  • aggregator:

    An object you use to collect matching results. The aggregator is thread-safe, so you may send it messages on other threads.

Discussion

The system calls this method during a find session to perform the search. Your implenentation should search for matching text ranges in your app’s documents and call foundRange(_:searchString:document:) on the aggregator object to add them to the set of matching ranges.

See Also

Handling searches