Instance Property

foundItemsHandler

The block to execute when the query finds a new batch of matching items.

Declaration

@property(copy, nonnull) void (^foundItemsHandler)(NSArray<CSSearchableItem *> *items);

Discussion

The block returns no value and takes the following parameter:

items

An array of indexed items that match the specified query.

The query object serializes the calls to the handler block as new items are found. Although items contains only the new items that have been found (previously found items are not included in the array), the query updates foundItemCount before each call to this handler block, so that foundItemCount contains the running total of items that have been found. If no items are found, the query completes successfully and foundItemCount is 0.

See Also

Handling Query Results

completionHandler

The block to execute when the query completes.

foundItemCount

The number of items found so far.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software