TTTrafficIncidentsDelegate

Objective-C

@protocol TTTrafficIncidentsDelegate <NSObject>

Swift

protocol TTTrafficIncidentsDelegate : NSObjectProtocol

TTTrafficIncidentsDelegate

  • Method responsible to handle Traffic Incidents response when search returns results. Within this callback the user will obtain a response populated with results.

    Declaration

    Objective-C

    - (void)incidentDetails:(TTTrafficIncidents *_Nonnull)trafficIncidents
        completedWithResponse:(TTIncidentDetailsResponse *_Nonnull)response;

    Swift

    optional func incidentDetails(_ trafficIncidents: TTTrafficIncidents, completedWith response: TTIncidentDetailsResponse)

    Parameters

    trafficIncidents

    Object type TTTrafficIncidents.

    response

    Object type TTIncidentDetailsResponse.

  • Method responsible to handle Traffic Incidents response when search returns error. Within this callback user will obtain TTResponseError containing a Throwable fail reason

    Declaration

    Objective-C

    - (void)incidentDetails:(TTTrafficIncidents *_Nonnull)trafficIncidents
            failedWithError:(id)error;

    Swift

    optional func incidentDetails(_ trafficIncidents: TTTrafficIncidents, failedWithError error: Any!)

    Parameters

    trafficIncidents

    Object type TTTrafficIncidents.

    error

    Object type TTResponseError.