TKVehicularHelper

Objective-C

@interface TKVehicularHelper : NSObject

/**
 @return Converts the vehicle type string back to a vehicle type
 */
+ (TKVehicleType)vehicleTypeForString:(NSString *)vehicleTypeString;

/**
 @return The vehicle type as a human-readable string.
 */
+ (nullable NSString *)stringForVehicleType:(TKVehicleType)vehicleType;

/**
 @return The vehicle type as an icon.
 */
+ (nullable TKImage *)iconForVehicle:(id<TKVehicular>)vehicle;

/**
 @return Vehicles name if there's one, otherwise it's type to a string
 */
+ (nullable NSString *)titleForVehicle:(id<TKVehicular>)vehicle;

/**
 @return The SkedGo API-compliant dictionary representation of this vehicle
 */
+ (NSDictionary<NSString *, id> *)skedGoFullDictionaryForVehicle:(id<TKVehicular>)vehicle;

/**
 @return The SkedGo API-compliant dictionary representation as a reference to this vehicle which should have been elsewhere provided through a call to `skedGoFullDictionaryForVehicle`.
 */
+ (NSDictionary<NSString *, id> *)skedGoReferenceDictionaryForVehicle:(id<TKVehicular>)vehicle;

@end

Swift

class TKVehicularHelper : NSObject

Undocumented

  • Declaration

    Objective-C

    + (TKVehicleType)vehicleTypeForString:(nonnull NSString *)vehicleTypeString;

    Swift

    class func vehicleType(for vehicleTypeString: String) -> TKVehicleType

    Return Value

    Converts the vehicle type string back to a vehicle type

  • Declaration

    Objective-C

    + (nullable NSString *)stringForVehicleType:(TKVehicleType)vehicleType;

    Swift

    class func string(for vehicleType: TKVehicleType) -> String?

    Return Value

    The vehicle type as a human-readable string.

  • Declaration

    Objective-C

    + (nullable UIImage *)iconForVehicle:(nonnull id<TKVehicular>)vehicle;

    Swift

    class func icon(forVehicle vehicle: TKVehicular) -> UIImage?

    Return Value

    The vehicle type as an icon.

  • Declaration

    Objective-C

    + (nullable NSString *)titleForVehicle:(nonnull id<TKVehicular>)vehicle;

    Swift

    class func title(forVehicle vehicle: TKVehicular) -> String?

    Return Value

    Vehicles name if there’s one, otherwise it’s type to a string

  • Declaration

    Objective-C

    + (nonnull NSDictionary<NSString *, id> *)skedGoFullDictionaryForVehicle:
        (nonnull id<TKVehicular>)vehicle;

    Swift

    class func skedGoFullDictionary(forVehicle vehicle: TKVehicular) -> [String : Any]

    Return Value

    The SkedGo API-compliant dictionary representation of this vehicle

  • Declaration

    Objective-C

    + (nonnull NSDictionary<NSString *, id> *)skedGoReferenceDictionaryForVehicle:
        (nonnull id<TKVehicular>)vehicle;

    Swift

    class func skedGoReferenceDictionary(forVehicle vehicle: TKVehicular) -> [String : Any]

    Return Value

    The SkedGo API-compliant dictionary representation as a reference to this vehicle which should have been elsewhere provided through a call to skedGoFullDictionaryForVehicle.