Instance Method

initWithRequest:

Initializes and returns a directions object using the specified request.

Declaration

- (instancetype)initWithRequest:(MKDirectionsRequest *)request;

Parameters

request

The request object containing the start and end points of the route. This parameter must not be nil.

Return Value

An initialized directions object.

Discussion

After initializing your directions object, you must call the calculateDirectionsWithCompletionHandler: or calculateETAWithCompletionHandler: method to perform the request.

See Also

Creating a Directions Object

MKDirectionsRequest

The start and end points of a route, along with the planned mode of transportation.