Initializer

init(provider:trainName:trainNumber:tripDuration:departureStationLocation:departurePlatform:arrivalStationLocation:arrivalPlatform:)

Creates a new train trip with the specified contents and attributes.

Declaration

init(provider: String?, trainName: String?, trainNumber: String?, tripDuration: INDateComponentsRange, departureStationLocation: CLPlacemark, departurePlatform: String?, arrivalStationLocation: CLPlacemark, arrivalPlatform: String?)

Parameters

provider

The name for the train company.

trainName

The name of the train. For example, "11 Coast Starlight".

trainNumber

The unique identifier for the train.

tripDuration

The date and time range for the departure and arrival of the train.

departureStationLocation

The station from which the train departs.

departurePlatform

The platform from which the train departs.

arrivalStationLocation

The station at which the train arrives.

arrivalPlatform

The platform at which the train arrives.

Return Value

A new INTrainTrip object or nil if unable to create one.