Notable Classes

Fetcher methods

  • Undocumented

    See more

    Declaration

    Swift

    public enum TKBuzzInfoProvider
    From TripKitUI:
    extension TKBuzzInfoProvider: @retroactive ReactiveCompatible
  • Undocumented

    See more

    Declaration

    Swift

    @objc
    public class TKDeparturesProvider : NSObject
  • An action that can be added to a TKUI<*>Card. An array of these actions is typically generated by a factory method in a card’s configuration property, e.g., TKUITripOverviewCard.config.tripActionsFactory or TKUIServiceCard.config.serviceActionsFactory

    For a concerte example, see TKUIStartTripAction.

    If the action changes the state of the button itself, some care need to be taken that this is reflected:

    func buildFavoriteAction(stop: TKUIStopAnnotation) -> TKUITimetableCard.Action {
      func isFavorite() -> Bool { FavoriteHelper.isFavorite(stop) }
      func title() -> String { isFavorite() ? "Remove" : "Add" }
      func icon() -> UIImage { isFavorite() ? UIImage.remove : UIImage.add }
    
      return TKUITimetableCard.Action(
        title: title, icon: icon
      ) { action, _, stop, _ in
        FavoriteHelper.toggleFavorite(stop)
      }
    }
    
    
    See more

    Declaration

    Swift

    @MainActor
    open class TKUICardAction<Card, Model> : ObservableObject where Card : TGCard
  • This class let’s you customise various aspects of TripKitUI that apply across multiple view controllers or cards. You can do this by setting the various parts of TKUICustomization.shared, which should be done before displaying any view controllers or cards.

    See more

    Declaration

    Swift

    public class TKUICustomization
  • The base class for map managers in TripKitUI

    The following diagram illustrates the relationships:

    ┌────────────────────────────────────────────────────────────────────┐
    │ TGCardViewController                                               │
    │ ┏━━━━━━━━━━━━━━━━━━━┓                   ╔════════════════════════╗ │
    │ ┃TGMapManager       ┃─ ─ ─Implements ─ ▶║TGCompatibleMapManager  ║ │
    │ ┗━━━━━━━━━━━━━━━━━━━┛                   ╚════════════════════════╝ │
    └───────────▲────────────────────────────────────────────────────────┘
                │
            Subclass──────────────────┐
                │                     │
    ┌───────────┼─────────────────────┼──────────────────────────────────┐
    │ TripKitUI │                     │                                  │
    │ ┏━━━━━━━━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━━━━━━┓                        │
    │ ┃TKUIMapManager     ┃ ┃TKUIComposingMap...┃                        │
    │ ┗━━━━━━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━━━━┛                        │
    │           ▲                                                        │
    │       Subclass──────────────────┬─────────────────────┐            │
    │           │                     │                     │            │
    │ ┏━━━━━━━━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━━━━━━┓  │
    │ ┃TKUIServiceMapMa...┃ ┃TKUIRoutingResul...┃ ┃TKUITripMapManager ┃  │
    │ ┗━━━━━━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━━━━┛  │
    └────────────────────────────────────────────────────────────────────┘
    
    See more

    Declaration

    Swift

    @MainActor
    open class TKUIMapManager : TGMapManager