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.

  • Undocumented

    Declaration

    Swift

    public static var config: TKUIRoutingResultsCard.Configuration
  • Undocumented

    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, origin: MKAnnotation? = nil, zoomToDestination: Bool = true, initialPosition: TGCardPosition? = nil)

    Parameters

    destination

    The destination of the routing request.

    origin

    Optionally, the origin lf the routing request. if not supplied, will use current location.

    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.

  • Undocumented

    Declaration

    Swift

    public init(request: TripRequest, editable: Bool = true)
  • Declaration

    Swift

    public override var preferredView: UIView? { get }
  • Declaration

    Swift

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

    Swift

    public override func willAppear(animated: Bool)
  • Declaration

    Swift

    public override func didAppear(animated: Bool)
  • Declaration

    Swift

    public override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?)
  • Declaration

    Swift

    public override func willDisappear(animated: Bool)

Keyboard shortcuts

Cell configuration

Search places

Picking times

Picking transport modes