VOTheme

@interface VOTheme : NSObject <NSCopying>

VOTheme 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 ‘VOTheme’.

    Declaration

    Objective-C

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

    Swift

    init(presetTheme: VOPresetTheme)

    Parameters

    presetTheme

    - One of the available ‘VOPresetTheme’s.

  • Undocumented

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

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

    Swift

    var primaryHeaderFontTheme: VOFontTheme { 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)
        VOFontTheme *_Nonnull secondaryHeaderFontTheme;

    Swift

    var secondaryHeaderFontTheme: VOFontTheme { 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)
        VOFontTheme *_Nonnull navigationHeaderFontTheme;

    Swift

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

    Declaration

    Objective-C

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

    Swift

    var bodyFontTheme: VOFontTheme { 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) VOFontTheme *_Nonnull captionFontTheme;

    Swift

    var captionFontTheme: VOFontTheme { 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) VOFontTheme *_Nonnull displayFontTheme;

    Swift

    var displayFontTheme: VOFontTheme { 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)
        VOButtonTheme *_Nonnull positiveActionButtonTheme;

    Swift

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

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

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

    Swift

    var negativeActionButtonTheme: VOButtonTheme { get set }