Configuration

struct Configuration

Configurtion of any TKUITripOverviewCard. Use this to add custom actions.

This isn’t created directly, but rather you modify the static instance accessible from TKUITripOverviewCard.config.

  • Set this to add a tap-action to every segment in the trip overview card.

    Handler will be called when the user taps the segment. You can, for example, use this to present a detailed view of the segment.

    By default pushes a TKUITripModeByModeCard starting on this segment

    Declaration

    Swift

    public var presentSegmentHandler: ((TKUITripOverviewCard, TKSegment) -> Void)?
  • Set this to use your own map manager. You can use this in combination with TGCardViewController.builder to use a map other than Apple’s MapKit.

    Defaults to using TKUITripMapManager.

    Declaration

    Swift

    public var mapManagerFactory: ((Trip) -> TKUITripMapManagerType)

Customising trip actions

  • Set this to add a list of action buttons to a trip overview card.

    These will also be exposed as context actions on the TKUIRoutingResultsCard.

    Warning

    Only a maximum of three actions can be accomodated. Any more than that will be ignored.

    Called when a trip overview card gets presented.

    Declaration

    Swift

    public var tripActionsFactory: ((Trip) -> [TripAction])?
  • This controls whether the title is visible underneath an action icon.

    The default is false, which means actions are displayed as icons only. We recommend that choosing an action icon that is immediately obvious what it does and avoids having to set this to true. If this must be set to true, we recommend that the titles for your actions are short, otherwise, some of the titles may be truncated.

    Note

    This only applies to actions that are arranged in a compact layout

    Declaration

    Swift

    public var showTripActionTitle: Bool

Customising segment actions

  • Set this to add a list of action buttons to a segment on the trip overview card.

    Warning

    Only a maximum of three actions can be accomodated. Any more than that will be ignored.

    Called when a trip overview card gets presented.

    Declaration

    Swift

    public var segmentActionsfactory: ((TKSegment) -> [SegmentAction])?
  • Set this to limit how many alerts are shown for a segment

    Declaration

    Swift

    public var maximumAlertsPerSegment: Int