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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software