MutableButtonAppearance

@objc(YMAMutableButtonAppearance)
@objcMembers
public class MutableButtonAppearance : ButtonAppearance

Class with editable settings for the standard button appearance.

  • Settings for the button label.

    Declaration

    Swift

    override public var textAppearance: LabelAppearance { get set }
  • Label color when the button is clicked.

    Declaration

    Swift

    override public var highlightedTextColor: UIColor { get set }
  • The color of the button background in its normal state.

    Declaration

    Swift

    override public var normalColor: UIColor { get set }
  • The color of the button background when clicked.

    Declaration

    Swift

    override public var highlightedColor: UIColor { get set }
  • The color of the button border.

    Declaration

    Swift

    override public var borderColor: UIColor { get set }
  • The thickness of the button border.

    Declaration

    Swift

    override public var borderWidth: CGFloat { get set }
  • Corresponding immutable representation of current label appearance.

    Declaration

    Swift

    public var buttonAppearance: ButtonAppearance { get }
  • Undocumented

    Declaration

    Swift

    public convenience init()
  • Creates an object of the MutableButtonAppearance class, i.e., a button with the specified appearance (label font, label color, border color, and other settings).

    Declaration

    Swift

    public required convenience init(
        textAppearance: LabelAppearance,
        normalColor: UIColor,
        highlightedColor: UIColor,
        borderColor: UIColor,
        borderWidth: CGFloat
    )

    Parameters

    textAppearance

    Settings for the button label.

    normalColor

    The color of the button background in its normal state.

    highlightedColor

    The color of the button background when clicked.

    borderColor

    The color of the button border.

    borderWidth

    The thickness of the button border.

    Return Value

    Configured button appearance.

  • Creates an object of the MutableButtonAppearance class, i.e., a button with the specified appearance (label font, label color, border color, and other settings).

    Declaration

    Swift

    public required convenience init(
        textAppearance: LabelAppearance,
        highlightedTextColor: UIColor,
        normalColor: UIColor,
        highlightedColor: UIColor,
        borderColor: UIColor,
        borderWidth: CGFloat
    )

    Parameters

    textAppearance

    Settings for the button label.

    highlightedTextColor

    Label color when the button is clicked.

    normalColor

    The color of the button background in its normal state.

    highlightedColor

    The color of the button background when clicked.

    borderColor

    The color of the button border.

    borderWidth

    The thickness of the button border.

    Return Value

    Configured button appearance.

NSCopying

  • Undocumented

    Declaration

    Swift

    override public func copy(with zone: NSZone? = nil) -> Any