Protocols

The following protocols are available globally.

  • LightenColorSet, represents lighter colors of base color.

    See more

    Declaration

    Swift

    public protocol LightenColorSet
  • DarkenColorSet, represents darker colors of base color.

    See more

    Declaration

    Swift

    public protocol DarkenColorSet
  • LightenColorSet, represents lighter colors of base color.

    See more

    Declaration

    Swift

    public protocol ExtendedLightenColorSet
  • ExtendedDarkenColorSet, represents extedend darker colors of base color.

    See more

    Declaration

    Swift

    public protocol ExtendedDarkenColorSet
  • Color which represents base color, other palettes creates lighter and darker colors of base color.

    See more

    Declaration

    Swift

    public protocol Color
  • ColorPalette represents base color with set of lighter and darker colors of base, total 5 colors (shades and tints) are represented by ColorPalette.

    See more

    Declaration

    Swift

    public protocol ColorPalette : Color, DarkenColorSet, LightenColorSet
  • LargerColorPalette represents base color with set of lighter and darker colors of base, total 9 colors (shades and tints) are represented by ColorPalette.

    Use it when larger set of lighter and darker colors are required.

    See more

    Declaration

    Swift

    public protocol LargerColorPalette : ColorPalette, ExtendedDarkenColorSet, ExtendedLightenColorSet
  • Semantic color palette, used for messaging. Used to deliver information about success, error, warning.

    Generally red for errors, green for success, yellow or organge for warning, blue or gray for informational messages.

    See more

    Declaration

    Swift

    public protocol SemanticColorPalette
  • A color palette which contains primary, secondary and supplimentory colors with their darker and lighter color sets. Also contains default semantic and grayscale palette.

    See more

    Declaration

    Swift

    public protocol MainColorPalette
  • GradientColor protocol provides gradient defination with start & end colors and start & end points. Helper to create gradient using CAGradientLayer.

    // Left-to-Right gradient color can be defined as below
    struct CardGradientColor: GradientColor {
    let startColor = UIColor("#1e3c72")
    let endColor =  UIColor("#2a5298")
    }
    
    // Single color with darker/light shade gradient color can be defined as below.
    //`endColor` will be darker or ligher of `startColor`
    struct ShadedGradientColor: GradientColor {
    let startColor = UIColor("#1e3c72")
    }
    

    UIColor also implements GradientColor protocol, so instance of UIColor can be used directly wherever GradientColor used.

    See also

    SeeAlso:- GradientView

    See also

    SeeAlso:- `public convenience init(gradient: GradientColor)
    See more

    Declaration

    Swift

    public protocol GradientColor
  • Type which can reprent value, Mostly used with autolayouts, but not limited to it. Contains some utility methods to create margins, insets etc.

    See more

    Declaration

    Swift

    public protocol LayoutValueRepresentable
  • Style protocol represents style which can be applied on control

    See more

    Declaration

    Swift

    public protocol Style
  • Represents them with color palette. Currenly supports only color palettes.

    See more

    Declaration

    Swift

    public protocol Theme
  • ThemeManager

    See more

    Declaration

    Swift

    public protocol ThemeManager
  • ThemeSwitcher hods replaceable theme

    See more

    Declaration

    Swift

    public protocol ThemeSwitcher : ThemeManager
  • DualThemeSwitcher holds two instance for theme, helper to create dual themes i.e light/dark mode or day/night mode.

    See more

    Declaration

    Swift

    public protocol DualThemeSwitcher : ThemeSwitcher
  • TypographyOptions options to configure typography

    See more

    Declaration

    Swift

    public protocol TypographyOptions
  • Typography provides static size fonts as per FontStyle

    See more

    Declaration

    Swift

    public protocol Typography
  • DynamicTypography provides dynamic types fonts along with static size fonts

    See more

    Declaration

    Swift

    public protocol DynamicTypography : Typography, TypographyOptions
  • A type with a customized font representation

    Declaration

    Swift

    public protocol FontConvertible
  • Represnts font set.

    See more

    Declaration

    Swift

    public protocol Font
  • SystemFont font which represents built in Font Style - UIFont.TextStyle.

    See more

    Declaration

    Swift

    public protocol SystemFont : Font where Self.TextStyle == UIFont.TextStyle
  • Dynamically scalable font which supports built in textstyle - UIFont.TextStyle.

    See more

    Declaration

    Swift

    public protocol DynamicTypeFont : SystemFont
  • DynamicTypeCustomTextStyleFont - Support font with custom font style.

    Declaration

    Swift

    public protocol DynamicTypeCustomTextStyleFont : Font