TKModeInfo

public class TKModeInfo : NSObject, Codable, NSSecureCoding

Information to identify and display a transport mode. Kind of like the big sibling of a mode identifier string.

  • The mode identifier string. Can be nil, e.g., for parking as that can apply to multiple modes.

    Declaration

    Swift

    @objc
    public let identifier: String?
  • alt

    Text representation of the image

    Declaration

    Swift

    @objc
    public let alt: String
  • Image part name; use with TKStyleManager.image(forModeImageName:)

    Declaration

    Swift

    @objc
    public let localImageName: String?
  • Image part name; use with TKServer.imageURL(iconFileNamePart:)

    Declaration

    Swift

    @objc
    public let remoteImageName: String?
  • If true, then remoteImageName should be treated as a template image and have an appropriate colour applied to it.

    Declaration

    Swift

    @objc
    public var remoteImageIsTemplate: Bool { get }
  • If true, remoteImageIsBranding points at a brand image and should be shown next to the local image; if false it shoud replace it.

    Declaration

    Swift

    @objc
    public var remoteImageIsBranding: Bool { get }
  • Additional descriptor for image, e.g., “GoGet”, “Shuttle”

    Declaration

    Swift

    @objc
    public let descriptor: String?
  • Declaration

    Swift

    @objc
    public var color: TKColor? { get }
  • Declaration

    Swift

    @objc(modeInfoForDictionary:)
    public class func modeInfo(for json: [String : Any]?) -> TKModeInfo?
  • Declaration

    Swift

    public static let unknown: TKModeInfo

Equatable

  • Declaration

    Swift

    public override func isEqual(_ object: Any?) -> Bool
  • Declaration

    Swift

    public override var hash: Int { get }

NSSecure coding