TextStyle

public struct TextStyle : ViewStyle
extension TextStyle: Equatable

Contains the styling customization options for any labels.

  • The font used to display the text.

    Declaration

    Swift

    public var font: UIFont
  • The color of the text.

    Declaration

    Swift

    public var color: UIColor
  • The color of the text when the element is disabled.

    Declaration

    Swift

    public var disabledColor: UIColor
  • The technique to use for aligning the text.

    Declaration

    Swift

    public var textAlignment: NSTextAlignment
  • The corners style of the text item.

    Declaration

    Swift

    public var cornerRounding: CornerRounding
  • Initializes the text style.

    Declaration

    Swift

    public init(font: UIFont,
                color: UIColor,
                disabledColor: UIColor = UIColor.Adyen.componentSecondaryLabel,
                textAlignment: NSTextAlignment,
                cornerRounding: CornerRounding = .none,
                backgroundColor: UIColor = .clear)

    Parameters

    font

    The font used to display the text.

    color

    The color of the text.

    disabledColor

    The color of the text when the element is disabled.

    textAlignment

    The technique to use for aligning the text.

    cornerRounding

    The corners style of the text item.

    backgroundColor

    The background color.

  • Initializes the text style.

    Declaration

    Swift

    public init(font: UIFont, color: UIColor)

    Parameters

    font

    The font used to display the text.

    color

    The color of the text.

  • Declaration

    Swift

    public static func == (lhs: TextStyle, rhs: TextStyle) -> Bool
  • Convert TextSyle into collection of attributes.

    Declaration

    Swift

    public var stringAttributes: [NSAttributedString.Key : Any] { get }