TKUINearbyViewModel
@MainActor
public class TKUINearbyViewModel
extension TKUINearbyViewModel: TKUIHomeComponentViewModel
View model for a card that displays transport locations in a particular map region.
Can be used as a component on the home card as it implements TKUIHomeComponentViewModel
.
The accompanying map manager is TKUINearbyMapManager
and table view cell is
TKUINearbyCell
.
-
Undocumented
See moreDeclaration
Swift
public enum Next
-
Undocumented
See moreDeclaration
Swift
public struct ListInput
-
Undocumented
See moreDeclaration
Swift
public struct MapInput
-
Creates a new view model
Declaration
Parameters
mode
The mode identifier to which to limit the nearby locations
strictModeMatch
Should
mode
be treated strictly? If not, you might request on-street parking, but also get off-street parking.fixedLocation
Location to fix this to; if this is proivded,
mapInput.mapRect
will be ignoredpickedModes
The selected modes (only used if
mode == nil
)mapCenter
The centre of the map, if the user moved it, should drive with
nil
if map is centred on the user’s current location -
Undocumented
Declaration
Swift
public let limitToMode: String?
-
Undocumented
Declaration
Swift
public let fixedLocation: MKAnnotation?
-
Undocumented
Declaration
Swift
public let availableModes: Driver<[TKModeInfo]>
-
Undocumented
Declaration
Swift
public let error: Driver<Error>
-
Undocumented
Declaration
Swift
public let sections: Driver<[Section]>
-
Undocumented
Declaration
Swift
public let mapAnnotations: Driver<[TKUIIdentifiableAnnotation]>
-
Undocumented
Declaration
Swift
public let mapOverlays: Driver<[MKOverlay]>
-
Undocumented
Declaration
Swift
public let next: Signal<Next>
-
This will always be an annotations that’s in
mapAnnotations
Declaration
Swift
public let mapAnnotationToSelect: Signal<TKUIIdentifiableAnnotation>
-
This will typically be an annotation that’s NOT in
mapAnnotations
Declaration
Swift
public let searchResultToShow: Driver<MKAnnotation?>
-
An item in a section on the nearby screen
See moreDeclaration
Swift
public struct Item
extension TKUINearbyViewModel.Item: Equatable
extension TKUINearbyViewModel.Item: IdentifiableType
extension TKUINearbyViewModel.Item: TKUIHomeComponentItem
-
A section on the nearby screen, which is made up of various sorted items.
See moreDeclaration
-
Declaration
Swift
public static func buildInstance(from inputs: TKUIHomeComponentInput) -> Self
-
Declaration
Swift
public var identity: String { get }
-
Declaration
Swift
public var customizerItem: TKUIHomeCardCustomizerItem? { get }
-
Declaration
Swift
public var homeCardSection: Driver<TKUIHomeComponentContent> { get }
-
Declaration
Swift
public var nextAction: Signal<TKUIHomeCard.ComponentAction> { get }
-
Declaration
Swift
public func cell(for item: TKUIHomeComponentItem, at indexPath: IndexPath, in tableView: UITableView) -> UITableViewCell?
-
Declaration
Swift
public func registerCell(with tableView: UITableView)