TKStyleManager

Objective-C

@interface TKStyleManager : NSObject

+ (NSLocale *)applicationLocale;

+ (TKColor *)darkTextColor DEPRECATED_MSG_ATTRIBUTE("Use dynamic colors that are compatible with Dark Mode, e.g., from TripKitUI");

+ (TKColor *)lightTextColor DEPRECATED_MSG_ATTRIBUTE("Use dynamic colors that are compatible with Dark Mode, e.g., from TripKitUI");

#if TARGET_OS_IPHONE
+ (UIButton *)cellAccessoryButtonWithImage:(UIImage *)image
                                    target:(nullable id)target
                                    action:(nullable SEL)selector;
#endif

#pragma mark - Image names

+ (TKImage *)activityImage:(NSString *)partial;

+ (TKImage *)imageNamed:(NSString *)name;

+ (nullable TKImage *)optionalImageNamed:(NSString *)name;

+ (NSBundle *)bundle;

#pragma mark - Date formatting

+ (NSString *)timeString:(NSDate *)time
             forTimeZone:(nullable NSTimeZone *)timeZone;

+ (NSString *)timeString:(NSDate *)time
             forTimeZone:(nonnull NSTimeZone *)timeZone
      relativeToTimeZone:(nullable NSTimeZone *)relativeTimeZone;

+ (NSString *)dateString:(NSDate *)time
						 forTimeZone:(NSTimeZone *)timeZone;

+ (NSString *)stringForDate:(NSDate *)date
                forTimeZone:(NSTimeZone *)timeZone
                   showDate:(BOOL)showDate
                   showTime:(BOOL)showTime;

+ (NSString *)stringForDate:(NSDate *)date
                forTimeZone:(NSTimeZone *)timeZone
                forceFormat:(NSString *)format;

+ (NSString *)stringForDate:(NSDate *)date
                forTimeZone:(NSTimeZone *)timeZone
                 forceStyle:(NSDateFormatterStyle)style;

@end

Swift

class TKStyleManager : NSObject

Undocumented

  • Undocumented

    Declaration

    Objective-C

    + (NSLocale *)applicationLocale;

    Swift

    class func applicationLocale() -> Locale
  • Deprecated

    Use dynamic colors that are compatible with Dark Mode, e.g., from TripKitUI

    Undocumented

    Declaration

    Objective-C

    + (TKColor *)darkTextColor DEPRECATED_MSG_ATTRIBUTE("Use dynamic colors that are compatible with Dark Mode, e.g., from TripKitUI");

    Swift

    class func darkTextColor() -> UIColor
  • Deprecated

    Use dynamic colors that are compatible with Dark Mode, e.g., from TripKitUI

    Undocumented

    Declaration

    Objective-C

    + (TKColor *)lightTextColor DEPRECATED_MSG_ATTRIBUTE("Use dynamic colors that are compatible with Dark Mode, e.g., from TripKitUI");

    Swift

    class func lightTextColor() -> UIColor
  • Undocumented

    Declaration

    Objective-C

    + (UIButton *)cellAccessoryButtonWithImage:(UIImage *)image
                                        target:(nullable id)target
                                        action:(nullable SEL)selector;

    Swift

    class func cellAccessoryButton(with image: UIImage, target: Any?, action selector: Selector?) -> UIButton

Image names

  • Undocumented

    Declaration

    Objective-C

    + (TKImage *)activityImage:(NSString *)partial;

    Swift

    class func activityImage(_ partial: String) -> UIImage
  • Undocumented

    Declaration

    Objective-C

    + (TKImage *)imageNamed:(NSString *)name;

    Swift

    class func imageNamed(_ name: String) -> UIImage
  • Undocumented

    Declaration

    Objective-C

    + (nullable TKImage *)optionalImageNamed:(NSString *)name;

    Swift

    class func optionalImageNamed(_ name: String) -> UIImage?
  • Undocumented

    Declaration

    Objective-C

    + (NSBundle *)bundle;

    Swift

    class func bundle() -> Bundle

Date formatting

  • Undocumented

    Declaration

    Objective-C

    + (NSString *)timeString:(NSDate *)time
                 forTimeZone:(nullable NSTimeZone *)timeZone;

    Swift

    class func timeString(_ time: Date, for timeZone: TimeZone?) -> String
  • Undocumented

    Declaration

    Objective-C

    + (NSString *)timeString:(NSDate *)time
                 forTimeZone:(nonnull NSTimeZone *)timeZone
          relativeToTimeZone:(nullable NSTimeZone *)relativeTimeZone;

    Swift

    class func timeString(_ time: Date, for timeZone: TimeZone, relativeTo relativeTimeZone: TimeZone?) -> String
  • Undocumented

    Declaration

    Objective-C

    + (NSString *)dateString:(NSDate *)time
    						 forTimeZone:(NSTimeZone *)timeZone;

    Swift

    class func dateString(_ time: Date, for timeZone: TimeZone) -> String
  • Undocumented

    Declaration

    Objective-C

    + (NSString *)stringForDate:(NSDate *)date
                    forTimeZone:(NSTimeZone *)timeZone
                       showDate:(BOOL)showDate
                       showTime:(BOOL)showTime;

    Swift

    class func string(for date: Date, for timeZone: TimeZone, showDate: Bool, showTime: Bool) -> String
  • Undocumented

    Declaration

    Objective-C

    + (NSString *)stringForDate:(NSDate *)date
                    forTimeZone:(NSTimeZone *)timeZone
                    forceFormat:(NSString *)format;

    Swift

    class func string(for date: Date, for timeZone: TimeZone, forceFormat format: String) -> String
  • Undocumented

    Declaration

    Objective-C

    + (NSString *)stringForDate:(NSDate *)date
                    forTimeZone:(NSTimeZone *)timeZone
                     forceStyle:(NSDateFormatterStyle)style;

    Swift

    class func string(for date: Date, for timeZone: TimeZone, force style: DateFormatter.Style) -> String

Color

  • Undocumented

    Declaration

    Objective-C

    + (TKColor *)globalTintColor;

    Swift

    class func globalTintColor() -> UIColor
  • Undocumented

    Declaration

    Objective-C

    + (TKColor *)globalAccentColor;

    Swift

    class func globalAccentColor() -> UIColor
  • Undocumented

    Declaration

    Objective-C

    + (BOOL)globalTranslucency;

    Swift

    class func globalTranslucency() -> Bool
  • Deprecated

    Use dynamic colors that are compatible with Dark Mode, e.g., from TripKitUI

    Undocumented

    Declaration

    Objective-C

    + (TKColor *)globalBarTintColor DEPRECATED_MSG_ATTRIBUTE("Use dynamic colors that are compatible with Dark Mode, e.g., from TripKitUI");

    Swift

    class func globalBarTintColor() -> UIColor
  • Deprecated

    Use dynamic colors that are compatible with Dark Mode, e.g., from TripKitUI

    Undocumented

    Declaration

    Objective-C

    + (TKColor *)globalSecondaryBarTintColor DEPRECATED_MSG_ATTRIBUTE("Use dynamic colors that are compatible with Dark Mode, e.g., from TripKitUI");

    Swift

    class func globalSecondaryBarTintColor() -> UIColor
  • Deprecated

    Use dynamic colors that are compatible with Dark Mode, e.g., from TripKitUI

    Undocumented

    Declaration

    Objective-C

    + (TKColor *)globalViewBackgroundColor DEPRECATED_MSG_ATTRIBUTE("Use dynamic colors that are compatible with Dark Mode, e.g., from TripKitUI");

    Swift

    class func globalViewBackgroundColor() -> UIColor

Images

Formatting

  • Declaration

    Swift

    @objc(exerciseStringForCalories:)
    public static func exerciseString(calories: Double) -> String