Type Alias

MKLocalSearch.CompletionHandler

A completion handler block for a search operation.

Declaration

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

Discussion

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.

class MKLocalSearch.Response

The results from a map-based search.

var isSearching: Bool

A Boolean indicating whether the search is currently in progress.

func cancel()

Cancels an in-progress search operation.