TKStyleManager

public class TKStyleManager

Undocumented

Default Styles

  • Undocumented

    Declaration

    Swift

    @objc(addDefaultShadow:)
    public static func addDefaultShadow(to view: UIView)
  • Undocumented

    Declaration

    Swift

    @objc(addDefaultOutline:)
    public static func addDefaultOutline(to view: UIView)
  • Undocumented

    Declaration

    Swift

    public static func style(_ searchBar: UISearchBar, includingBackground: Bool = false)
  • Undocumented

    Declaration

    Swift

    public static func style(_ searchBar: UISearchBar, includingBackground: Bool, styler: (UITextField) -> Void)

Images

Fonts

  • Undocumented

    See more

    Declaration

    Swift

    public enum FontWeight
  • This method returns a font with custom font face for a given font size and weight. If there’s no custom font face specified in the plist, system font face is used. This method is recommended to use with system controls such as UIButton

    Declaration

    Swift

    public static func font(size: Double, weight: FontWeight = .regular) -> TKFont

    Parameters

    size

    Font size desired

    weight

    Font weight desired

    Return Value

    A font with custom font face of the requested weight.

  • / This method returns a font with custom font face for a given text style and weight. If there’s no custom font face specified in the plist, system font face is used. This method is typically used on UILabel, UITextField, and UITextView but not recommended for system controls, such as UIButton.

    Declaration

    Swift

    public static func font(textStyle: TKFont.TextStyle, weight: FontWeight = .regular) -> UIFont

    Parameters

    textStyle

    TextStyle desired

    weight

    Font weight desired

    Return Value

    A font with custom font face and weight.

  • Undocumented

    Declaration

    Swift

    public static func systemFont(size: Double) -> TKFont
  • Undocumented

    Declaration

    Swift

    public static func boldSystemFont(size: Double) -> TKFont
  • Undocumented

    Declaration

    Swift

    public static func semiboldSystemFont(size: Double) -> TKFont
  • Undocumented

    Declaration

    Swift

    public static func mediumSystemFont(size: Double) -> TKFont
  • Undocumented

    Declaration

    Swift

    public static func customFont(forTextStyle textStyle: UIFont.TextStyle) -> UIFont
  • Undocumented

    Declaration

    Swift

    public static func boldCustomFont(forTextStyle textStyle: UIFont.TextStyle) -> UIFont
  • Undocumented

    Declaration

    Swift

    public static func semiboldCustomFont(forTextStyle textStyle: UIFont.TextStyle) -> UIFont
  • Undocumented

    Declaration

    Swift

    public static func mediumCustomFont(forTextStyle textStyle: UIFont.TextStyle) -> UIFont

Formatting

  • Undocumented

    Declaration

    Swift

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

    Declaration

    Swift

    public static func timeString(_ date: Date, for timeZone: TimeZone? = nil, relativeTo other: TimeZone? = nil) -> String
  • Undocumented

    Declaration

    Swift

    public static func dateString(_ date: Date, for timeZone: TimeZone? = nil) -> String
  • Undocumented

    Declaration

    Swift

    public static func format(_ date: Date, for timeZone: TimeZone? = nil, showDate: Bool, showTime: Bool) -> String
  • Undocumented

    Declaration

    Swift

    public static func format(_ date: Date, for timeZone: TimeZone? = nil, forceFormat: String? = nil, forceStyle: DateFormatter.Style = .none) -> String
  • Undocumented

    Declaration

    Swift

    public static func string(for date: Date, for timeZone: TimeZone? = nil, showDate: Bool, showTime: Bool) -> String