Type Alias

MKDirections.DirectionsHandler

The block to use for processing the requested route information.

Declaration

typealias DirectionsHandler = (MKDirections.Response?, Error?) -> Void

Discussion

This block takes two parameters:

  • The response parameter contains the route information for the request. If an error occurred or no route could be determined, this parameter is nil.

  • The error parameter contains information about any errors that occurred. If no errors occurred, this parameter is nil.

The implementation of your block should check for a value in the error parameter and, if that parameter is nil, incorporate the route information provided in the response parameter.

See Also

Getting the Directions

func calculate(completionHandler: MKDirections.DirectionsHandler)

Begins calculating the requested route information asynchronously.

class MKDirections.Response

The route information returned by Apple servers in response to one of your requests for directions.