UAInAppMessageButtonStyle

@interface UAInAppMessageButtonStyle : NSObject

Model object representing a custom style to be applied to an in-app message button component. Nil parameters are given default styling.

  • Padding adds constant values to the button component’s top, bottom, trailing or leading constraints within its parent view.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) UAPadding *additionalPadding;
  • The button text styling.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable)
        UAInAppMessageTextStyle *buttonTextStyle;

    Swift

    var buttonTextStyle: UAInAppMessageTextStyle? { get set }
  • The button’s height.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSNumber *buttonHeight;

    Swift

    var buttonHeight: NSNumber? { get set }
  • The spacing between buttons in the stacked layout;

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable)
        NSNumber *stackedButtonSpacing;

    Swift

    var stackedButtonSpacing: NSNumber? { get set }
  • The spacing between buttons in the separated layout;

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable)
        NSNumber *separatedButtonSpacing;

    Swift

    var separatedButtonSpacing: NSNumber? { get set }
  • The button border width;

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSNumber *borderWidth;

    Swift

    var borderWidth: NSNumber? { get set }
  • Text style factory method.

    Declaration

    Objective-C

    + (nonnull instancetype)
        styleWithAdditionalPadding:(nullable UAPadding *)additionalPadding
                   buttonTextStyle:(nullable UAInAppMessageTextStyle *)textStyle
                      buttonHeight:(nullable NSNumber *)buttonHeight
              stackedButtonSpacing:(nullable NSNumber *)stackedButtonSpacing
            separatedButtonSpacing:(nullable NSNumber *)separatedButtonSpacing
                       borderWidth:(nullable NSNumber *)borderWidth;

    Swift

    convenience init(additionalPadding: Any!, buttonTextStyle textStyle: UAInAppMessageTextStyle?, buttonHeight: NSNumber?, stackedButtonSpacing: NSNumber?, separatedButtonSpacing: NSNumber?, borderWidth: NSNumber?)

    Parameters

    additionalPadding

    The button view padding.

    textStyle

    The button text style.

    buttonHeight

    The button height.

    stackedButtonSpacing

    The spacing between stacked buttons.

    separatedButtonSpacing

    The spacing between separated buttons.

    borderWidth

    The button border width.

    Return Value

    Button Style with specified styling. Nil parameters will be given default styling.

  • Button style factory method for styling from a plist.

    Declaration

    Objective-C

    + (nonnull instancetype)styleWithDictionary:
        (nullable NSDictionary *)buttonStyle;

    Swift

    convenience init(dictionary buttonStyle: [AnyHashable : Any]?)

    Parameters

    buttonStyle

    Button style dictionary.

    Return Value

    Button Style with specified styling. Nil parameters will be given default styling