MKDirections.DirectionsHandler
The block to use for processing the requested route information.
Declaration
typealias DirectionsHandler = (MKDirections.Response?, (any Error)?) -> VoidParameters
- response:
The
responseparameter contains the route information for the request. If an error occurs or the framework can’t determine a route, this parameter isnil. - error:
The
errorparameter contains information about any errors that occur. If no errors occur, this parameter isnil.
Discussion
The implementation of your block needs to check for a value in the error parameter and, if that parameter is nil, incorporate the route information from the response parameter.