TKUITimetableCard

public class TKUITimetableCard : TKUITableCard
extension TKUITimetableCard: TKUITimePickerSheetDelegate
extension TKUITimetableCard: UITableViewDelegate

A card that lists all the departures from a public transport stop (or a list thereof).

  • Declaration

    Swift

    public static var config: TKUITimetableCard.Configuration
  • Provide a departures delegate to handle taps on departures, rather than using the default behaviour of pushing a card displaying the service.

    Declaration

    Swift

    public weak var departuresDelegate: TKUITimetableCardDelegate?
  • A string used to filter timetable. If provided, the timetable card will begin filtering immediately when is is pushed.

    Declaration

    Swift

    public var filter: String?
  • This callback is invoked every time the filter string is updated, passing through the latest value as an argument.

    Declaration

    Swift

    public var filterUpdatedHandler: ((String) -> Void)?
  • Configures a new instance that’ll fetch and display the departures for the provided public transport stop(s).

    Declaration

    Swift

    public init(titleView: (UIView, UIButton)? = nil, stops: [TKUIStopAnnotation], reusing mapManager: TGMapManager? = nil, initialPosition: TGCardPosition? = nil)

    Parameters

    stops

    Stops

    mapManager

    Optional map manager, which will be asked to display the stop(s) on appearance, by asking its map view to select the first stop and calling mapManager.zoom(to:animated).

  • Configures a new instance that’ll fetch and display the departures for the provided DLS table

    Declaration

    Swift

    public init(titleView: (UIView, UIButton)? = nil, dlsTable: TKDLSTable, startDate: Date, selectedServiceID: String? = nil, reusing mapManager: TGMapManager? = nil)

    Parameters

    dlsTable

    A stop pair

    startDate

    Date to start on

    mapManager

    Optional map manager, which will be asked to display the stop(s) on appearance, by asking its map view to select the first stop and calling mapManager.zoom(to:animated).

  • Declaration

    Swift

    required public init?(coder: NSCoder)
  • Declaration

    Swift

    override public func encode(with aCoder: NSCoder)

Public methods

Card Life Cycle

Time selection

Scrolling to base data and to bottom