Type Alias

MKDirections.ETAHandler

The block to use for processing travel-time information.

Declaration

typealias ETAHandler = (MKDirections.ETAResponse?, Error?) -> Void

Discussion

This block takes two parameters:

  • The response parameter contains the travel time response. If an error occurred or no travel time 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 travel-time information provided in the response parameter.

See Also

Getting the ETA

func calculateETA(completionHandler: MKDirections.ETAHandler)

Begins calculating the requested travel-time information asynchronously.

class MKDirections.ETAResponse

The travel-time information returned by Apple servers.