Instance Method

cancel()

Cancels a query operation.

Declaration

func cancel()

Discussion

When you cancel a query, and the query hasn’t already completed, completionHandler is called with the CSSearchQueryError.Code.cancelled error code.

See Also

Starting and Canceling a Query

func start()

Asynchronously queries the index for items that match the query object’s specifications.

var isCancelled: Bool

A Boolean value that indicates if the query has been cancelled.

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