VouchrTheme

@interface VouchrTheme : NSObject <NSCopying>

VouchrTheme is used to theme all views of the application. See the VouchrStyleGuide for how the theming is mapped to each view and style recommendations.

  • Designated initializer for ‘VouchrTheme’.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPresetTheme:(VouchrPresetTheme)presetTheme;

    Swift

    init(presetTheme: VouchrPresetTheme)

    Parameters

    presetTheme

    - One of the available ‘VouchrPresetTheme’s.

  • Undocumented

    Declaration

    Objective-C

    - (void)updateTheme:(VouchrTheme *)theme;

    Swift

    func update(_ theme: VouchrTheme)
  • Primary header font, majority of headers will use this theme. Corresponds to H1 in the style guide.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        FontTheme *_Nonnull primaryHeaderFontTheme;

    Swift

    var primaryHeaderFontTheme: FontTheme { get set }
  • Secondary header font, used in screens where a subheading is required, or a more subtle header. Corresponds to H2 in the style guide.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        FontTheme *_Nonnull secondaryHeaderFontTheme;

    Swift

    var secondaryHeaderFontTheme: FontTheme { get set }
  • Font theme to be used for navigation bar titles. Corresponds to N1 in the style guide.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        FontTheme *_Nonnull navigationHeaderFontTheme;

    Swift

    var navigationHeaderFontTheme: FontTheme { get set }
  • Font style used for paragraph text. Corresponds to B1 in the style guide.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) FontTheme *_Nonnull bodyFontTheme;

    Swift

    var bodyFontTheme: FontTheme { get set }
  • Font style used for more ‘fine print’ type of texts (eg. timestamps). Corresponds to C1 in the style guide.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) FontTheme *_Nonnull captionFontTheme;

    Swift

    var captionFontTheme: FontTheme { get set }
  • This font style is applied to elements which require much more size and emphasis than a header. This is typically used only for special cases (eg. amount display on gift card details screen). Corresponds to D1 in the style guide.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) FontTheme *_Nonnull displayFontTheme;

    Swift

    var displayFontTheme: FontTheme { get set }
  • Color used for screen backgrounds.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) UIColor *_Nonnull emptyBackgroundColor;

    Swift

    var emptyBackgroundColor: UIColor { get set }
  • Main brand color, used to accent screens.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) UIColor *_Nonnull accentColor;

    Swift

    var accentColor: UIColor { get set }
  • Secondary brand color, used to accent screens.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) UIColor *_Nonnull secondaryAccentColor;

    Swift

    var secondaryAccentColor: UIColor { get set }
  • style applied to confirmation buttons such as: next, done.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        ButtonTheme *_Nonnull positiveActionButtonTheme;

    Swift

    var positiveActionButtonTheme: ButtonTheme { get set }
  • Style applied to general buttons.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        ButtonTheme *_Nonnull neutralActionButtonTheme;

    Swift

    var neutralActionButtonTheme: ButtonTheme { get set }
  • Style applied to cancellation buttons such as: cancel, dismiss.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        ButtonTheme *_Nonnull negativeActionButtonTheme;

    Swift

    var negativeActionButtonTheme: ButtonTheme { get set }