Type Alias


A completion handler block for a search operation.


typealias CompletionHandler = (MKLocalSearch.Response?, Error?) -> Void


This block takes two parameters:

  • The response parameter contains the search results. If an error occurred, this parameter is set to nil and an appropriate error object is provided in the error parameter.

  • The error parameter is nil if the search was successful. If an error occurred during the operation, this parameter is set to an appropriate error object.

This block has no return value.

See Also

Performing the Search

func start(completionHandler: MKLocalSearch.CompletionHandler)

Starts the search and delivers the results to the specified completion handler.

var isSearching: Bool

A Boolean indicating whether the search is currently in progress.

func cancel()

Cancels an in-progress search operation.