TKUIRoutingResultsCard

public class TKUIRoutingResultsCard : TKUITableCard
extension TKUIRoutingResultsCard: UITableViewDelegate
extension TKUIRoutingResultsCard: TKUIRoutingQueryInputCardDelegate
extension TKUIRoutingResultsCard: TKUITimePickerSheetDelegate

An interactive card for displaying routing results, including updating from/to location, time and selected modes.

Can be used standalone or via TKUIRoutingResultsViewController.

  • Declaration

    Swift

    public static var config: TKUIRoutingResultsCard.Configuration
  • Declaration

    Swift

    public weak var resultsDelegate: TKUIRoutingResultsCardDelegate?
  • Set this callback to provide a custom handler for what should happen when a user selects a trip.

    If not provided, or you return true it will lead to the standard of pushing a TKUITripOverviewCard. Returning false will do nothing, i.e., the callback should handle displaying the trip.

    Declaration

    Swift

    public var onSelection: ((Trip) -> Bool)?
  • Initializes and returns a newly allocated card showing results of routing from current location to a specified destination. The card will be placed at the specified initial position.

    If the initial card position is not provided to the initializer, the value specified in the global configuration will be used. The default position is .peaking.

    Declaration

    Swift

    public init(destination: MKAnnotation, zoomToDestination: Bool = true, initialPosition: TGCardPosition? = nil)

    Parameters

    destination

    The destination of the routing request.

    zoomToDestination

    Whether the map should zoom to destination immediately. (Defaults to true if not provided.)

    initialPosition

    The initial position at which the card is placed when it’s displayed.

  • Declaration

    Swift

    public init(request: TripRequest)
  • Declaration

    Swift

    public required convenience init?(coder: NSCoder)
  • Declaration

    Swift

    public override func encode(with aCoder: NSCoder)
  • Declaration

    Swift

    override public func didBuild(tableView: UITableView, cardView: TGCardView)
  • Declaration

    Swift

    public override func didAppear(animated: Bool)
  • Declaration

    Swift

    public override func willDisappear(animated: Bool)

Keyboard shortcuts

Cell configuration

Search places

Picking times

Picking transport modes