TKUITimetableCard
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
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
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
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
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
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
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
public func visibleDepartures() -> [StopVisits]
-
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 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
public func searchBarSearchButtonClicked(_ searchBar: UISearchBar)
-
Undocumented
Declaration
Swift
public func timePicker(_ picker: TKUITimePickerSheet, pickedDate: Date, for type: TKTimeType)
-
Undocumented
Declaration
Swift
public func timePickerRequestsResign(_ pickerSheet: TKUITimePickerSheet)
-
Undocumented
Declaration
Swift
public func scrollViewDidScroll(_ scrollView: UIScrollView)
-
Undocumented
Declaration
Swift
public func scrollViewShouldScrollToTop(_ scrollView: UIScrollView) -> Bool