BTUIKAppearance

Objective-C

@interface BTUIKAppearance : NSObject

typedef NS_ENUM(NSInteger, BTUIKColorScheme) {
    BTUIKColorSchemeLight,
    BTUIKColorSchemeDark,
    BTUIKColorSchemeDynamic API_AVAILABLE(ios(13.0))
};

/// Shared instance used by Form elements
+ (instancetype)sharedInstance;

/// Fallback color for the overlay if blur is disabled
@property (nonatomic, strong) UIColor *overlayColor;
/// Tint color
@property (nonatomic, strong) UIColor *tintColor;
/// Bar color
@property (nonatomic, strong) UIColor *barBackgroundColor;
/// Font family
@property (nonatomic, strong) NSString *fontFamily;
/// Bold font family
@property (nonatomic, strong) NSString *boldFontFamily;
// Font, defaults to system font
@property (nonatomic, strong, readonly) UIFont *font;
// Bold font, defaults to system bold font
@property (nonatomic, strong, readonly) UIFont *boldFont;
/// Sheet background color
@property (nonatomic, strong) UIColor *formBackgroundColor;
/// Form field background color
@property (nonatomic, strong) UIColor *formFieldBackgroundColor;
/// Primary text color
@property (nonatomic, strong) UIColor *primaryTextColor;
/// Navigation title text color
/// Defaults to nil. When not set, navigation titles will use primaryTextColor
@property (nonatomic, strong) UIColor *navigationBarTitleTextColor;
/// Secondary text color
@property (nonatomic, strong) UIColor *secondaryTextColor;
/// Color of disabled buttons
@property (nonatomic, strong) UIColor *disabledColor;
/// Placeholder text color for form fields
@property (nonatomic, strong) UIColor *placeholderTextColor;
/// Line and border color
@property (nonatomic, strong) UIColor *lineColor;
/// Error foreground color
@property (nonatomic, strong) UIColor *errorForegroundColor;
/// Blur style
@property (nonatomic) UIBlurEffectStyle blurStyle;
/// Activity indicator style
@property (nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle;
/// Toggle blur effects
@property (nonatomic) BOOL useBlurs;
/// The keyboard the postal code field should use
@property (nonatomic) UIKeyboardType postalCodeFormFieldKeyboardType;
/// The highlighted version of the `tintColor`
@property (nonatomic, readonly, getter = highlightedTintColor) UIColor *highlightedTintColor;
/// Tint color for UISwitch when in the on position
@property (nonatomic, strong) UIColor *switchOnTintColor;
/// Tint color for UISwitch thumb
@property (nonatomic, strong) UIColor *switchThumbTintColor;
/// Color scheme of the Drop-In UI.
///
/// When set to BTUIKColorSchemeLight, the Drop-In UI uses a light color palette.
/// When set to BTUIKColorSchemeDark, the Drop-In UI uses a dark color palette.
/// When set to BTUIKColorSchemeDynamic, the Drop-In UI uses a dark or light color palette depending on the user's light or dark mode system preference. Only available in iOS 13+
@property (nonatomic) enum BTUIKColorScheme colorScheme;
/// Appearance style of keyboards associated with text fields
@property (nonatomic) UIKeyboardAppearance keyboardAppearance;

/// Sets the color (primary or secondary) and font with family and size (large or small)
/// These properties are on the [BTUIKAppearance sharedInstance]
+ (void)styleLabelPrimary:(UILabel *)label;
+ (void)styleLabelBoldPrimary:(UILabel *)label;
+ (void)styleSmallLabelBoldPrimary:(UILabel *)label;
+ (void)styleSmallLabelPrimary:(UILabel *)label;
+ (void)styleLabelSecondary:(UILabel *)label;
+ (void)styleLargeLabelSecondary:(UILabel *)label;
+ (void)styleSystemLabelSecondary:(UILabel *)label;
+ (UILabel *)styledNavigationTitleLabel;

+ (float)horizontalFormContentPadding;
+ (float)formCellHeight;
+ (float)verticalFormSpace;
+ (float)verticalFormSpaceTight;
+ (float)verticalSectionSpace;
+ (float)smallIconWidth;
+ (float)smallIconHeight;
+ (float)largeIconWidth;
+ (float)largeIconHeight;
+ (NSDictionary*)metrics;

@end

Swift

class BTUIKAppearance : NSObject

Undocumented

  • Shared instance used by Form elements

    Declaration

    Objective-C

    + (instancetype)sharedInstance;

    Swift

    class func sharedInstance() -> Self!
  • Fallback color for the overlay if blur is disabled

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor *overlayColor;

    Swift

    var overlayColor: UIColor! { get set }
  • Tint color

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor *tintColor;

    Swift

    var tintColor: UIColor! { get set }
  • Bar color

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor *barBackgroundColor;

    Swift

    var barBackgroundColor: UIColor! { get set }
  • Font family

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *fontFamily;

    Swift

    var fontFamily: String! { get set }
  • Bold font family

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *boldFontFamily;

    Swift

    var boldFontFamily: String! { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) UIFont *font

    Swift

    var font: UIFont! { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) UIFont *boldFont

    Swift

    var boldFont: UIFont! { get }
  • Sheet background color

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor *formBackgroundColor;

    Swift

    var formBackgroundColor: UIColor! { get set }
  • Form field background color

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor *formFieldBackgroundColor;

    Swift

    var formFieldBackgroundColor: UIColor! { get set }
  • Primary text color

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor *primaryTextColor;

    Swift

    var primaryTextColor: UIColor! { get set }
  • Navigation title text color Defaults to nil. When not set, navigation titles will use primaryTextColor

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor *navigationBarTitleTextColor;

    Swift

    var navigationBarTitleTextColor: UIColor! { get set }
  • Secondary text color

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor *secondaryTextColor;

    Swift

    var secondaryTextColor: UIColor! { get set }
  • Color of disabled buttons

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor *disabledColor;

    Swift

    var disabledColor: UIColor! { get set }
  • Placeholder text color for form fields

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor *placeholderTextColor;

    Swift

    var placeholderTextColor: UIColor! { get set }
  • Line and border color

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor *lineColor;

    Swift

    var lineColor: UIColor! { get set }
  • Error foreground color

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor *errorForegroundColor;

    Swift

    var errorForegroundColor: UIColor! { get set }
  • Blur style

    Declaration

    Objective-C

    @property (nonatomic) UIBlurEffectStyle blurStyle;

    Swift

    var blurStyle: UIBlurEffect.Style { get set }
  • Activity indicator style

    Declaration

    Objective-C

    @property (nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle;

    Swift

    var activityIndicatorViewStyle: UIActivityIndicatorView.Style { get set }
  • Toggle blur effects

    Declaration

    Objective-C

    @property (nonatomic) BOOL useBlurs;

    Swift

    var useBlurs: Bool { get set }
  • The keyboard the postal code field should use

    Declaration

    Objective-C

    @property (nonatomic) UIKeyboardType postalCodeFormFieldKeyboardType;

    Swift

    var postalCodeFormFieldKeyboardType: UIKeyboardType { get set }
  • The highlighted version of the tintColor

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=highlightedTintColor) UIColor *highlightedTintColor;

    Swift

    var highlightedTintColor: UIColor! { get }
  • Tint color for UISwitch when in the on position

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor *switchOnTintColor;

    Swift

    var switchOnTintColor: UIColor! { get set }
  • Tint color for UISwitch thumb

    Declaration

    Objective-C

    @property (nonatomic, strong) UIColor *switchThumbTintColor;

    Swift

    var switchThumbTintColor: UIColor! { get set }
  • Color scheme of the Drop-In UI.

    When set to BTUIKColorSchemeLight, the Drop-In UI uses a light color palette. When set to BTUIKColorSchemeDark, the Drop-In UI uses a dark color palette. When set to BTUIKColorSchemeDynamic, the Drop-In UI uses a dark or light color palette depending on the user’s light or dark mode system preference. Only available in iOS 13+

    Declaration

    Objective-C

    @property (nonatomic) enum BTUIKColorScheme colorScheme;

    Swift

    var colorScheme: BTUIKColorScheme { get set }
  • Appearance style of keyboards associated with text fields

    Declaration

    Objective-C

    @property (nonatomic) UIKeyboardAppearance keyboardAppearance;

    Swift

    var keyboardAppearance: UIKeyboardAppearance { get set }
  • Sets the color (primary or secondary) and font with family and size (large or small) These properties are on the [BTUIKAppearance sharedInstance]

    Declaration

    Objective-C

    + (void)styleLabelPrimary:(UILabel *)label;

    Swift

    class func styleLabelPrimary(_ label: UILabel!)
  • Undocumented

    Declaration

    Objective-C

    + (void)styleLabelBoldPrimary:(UILabel *)label;

    Swift

    class func styleLabelBoldPrimary(_ label: UILabel!)
  • Undocumented

    Declaration

    Objective-C

    + (void)styleSmallLabelBoldPrimary:(UILabel *)label;

    Swift

    class func styleSmallLabelBoldPrimary(_ label: UILabel!)
  • Undocumented

    Declaration

    Objective-C

    + (void)styleSmallLabelPrimary:(UILabel *)label;

    Swift

    class func styleSmallLabelPrimary(_ label: UILabel!)
  • Undocumented

    Declaration

    Objective-C

    + (void)styleLabelSecondary:(UILabel *)label;

    Swift

    class func styleLabelSecondary(_ label: UILabel!)
  • Undocumented

    Declaration

    Objective-C

    + (void)styleLargeLabelSecondary:(UILabel *)label;

    Swift

    class func styleLargeLabelSecondary(_ label: UILabel!)
  • Undocumented

    Declaration

    Objective-C

    + (void)styleSystemLabelSecondary:(UILabel *)label;

    Swift

    class func styleSystemLabelSecondary(_ label: UILabel!)
  • Undocumented

    Declaration

    Objective-C

    + (UILabel *)styledNavigationTitleLabel;

    Swift

    class func styledNavigationTitleLabel() -> UILabel!
  • Undocumented

    Declaration

    Objective-C

    + (float)horizontalFormContentPadding;

    Swift

    class func horizontalFormContentPadding() -> Float
  • Undocumented

    Declaration

    Objective-C

    + (float)formCellHeight;

    Swift

    class func formCellHeight() -> Float
  • Undocumented

    Declaration

    Objective-C

    + (float)verticalFormSpace;

    Swift

    class func verticalFormSpace() -> Float
  • Undocumented

    Declaration

    Objective-C

    + (float)verticalFormSpaceTight;

    Swift

    class func verticalFormSpaceTight() -> Float
  • Undocumented

    Declaration

    Objective-C

    + (float)verticalSectionSpace;

    Swift

    class func verticalSectionSpace() -> Float
  • Undocumented

    Declaration

    Objective-C

    + (float)smallIconWidth;

    Swift

    class func smallIconWidth() -> Float
  • Undocumented

    Declaration

    Objective-C

    + (float)smallIconHeight;

    Swift

    class func smallIconHeight() -> Float
  • Undocumented

    Declaration

    Objective-C

    + (float)largeIconWidth;

    Swift

    class func largeIconWidth() -> Float
  • Undocumented

    Declaration

    Objective-C

    + (float)largeIconHeight;

    Swift

    class func largeIconHeight() -> Float
  • Undocumented

    Declaration

    Objective-C

    + (NSDictionary*)metrics;

    Swift

    class func metrics() -> [AnyHashable : Any]!