completionHandler
The block to execute when the query finishes delivering all results.
Declaration
var completionHandler: (((any Error)?) -> Void)? { get set }Mentioned in
Discussion
Specify a value for this property only if you start your query with the start() method. When the query finishes, the query object executes the provided closure once to let you know the search is complete. Use your handler to perform any related cleanup. The block you assign to this property returns no parameters and takes the following parameter:
- error
An error object with details about a problem that occurred, or
nilif the query completed successfully.
If you start the query by accessing the results property of CSSearchQuery or the responses property of CSUserQuery, the query object doesn’t execute the block in this property.