Instance Method

completer(_:didFailWithError:)

Called when the specified search completer is unable to generate a list of search results.

Declaration

optional func completer(_ completer: MKLocalSearchCompleter, didFailWithError error: Error)

Parameters

completer

The search completer object reporting the error.

error

The error object containing the reason for the failure.

Discussion

Use this object to process any errors that occurred while generating search results. Even when an error occurs, the search completer starts a new search if it already has a new search string. Depending on the error, you might do nothing or let the user know that you were unable to obtain a list of search completions.

See Also

Getting the Search Results

func completerDidUpdateResults(MKLocalSearchCompleter)

Called when the specified search completer updates its array of search completions.