TKUITimetableCard
@MainActor
public class TKUITimetableCard : TKUITableCard
extension TKUITimetableCard: UISearchBarDelegate
extension TKUITimetableCard: TKUITimePickerSheetDelegate
extension TKUITimetableCard: UITableViewDelegate
A card that lists all the departures from a public transport stop (or a list thereof).
-
Undocumented
Declaration
Swift
@MainActor 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
@MainActor 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
@MainActor 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
@MainActor 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
@MainActor 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
@MainActor 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)
.
-
Undocumented
Declaration
Swift
@MainActor public func visibleDepartures() -> [StopVisits]
-
Declaration
Swift
@MainActor override public func didBuild(tableView: UITableView, cardView: TGCardView)
-
Declaration
Swift
@MainActor public override func willAppear(animated: Bool)
-
Declaration
Swift
@MainActor public override func didAppear(animated: Bool)
-
Declaration
Swift
@MainActor public override func willDisappear(animated: Bool)
-
Undocumented
Declaration
Swift
typealias Action = TKUICardAction<TKUITimetableCard, [TKUIStopAnnotation]>
-
Configurtion of any
TKUITimetableCard
. Use this to add custom actions.This isn’t created directly, but rather you modify the static instance accessible from
See moreTKUITimetableCard.config
.Declaration
Swift
struct Configuration
-
Undocumented
Declaration
Swift
@MainActor public func searchBarSearchButtonClicked(_ searchBar: UISearchBar)
-
Undocumented
Declaration
Swift
@MainActor public func timePicker(_ picker: TKUITimePickerSheet, pickedDate: Date, for type: TKTimeType)
-
Undocumented
Declaration
Swift
@MainActor public func timePickerRequestsResign(_ pickerSheet: TKUITimePickerSheet)
-
Undocumented
Declaration
Swift
@MainActor public func scrollViewDidScroll(_ scrollView: UIScrollView)
-
Undocumented
Declaration
Swift
@MainActor public func scrollViewShouldScrollToTop(_ scrollView: UIScrollView) -> Bool