UIButton

extension UIButton
  • Applies the text for passed state

    Declaration

    Swift

    public func setText(_ text: Text, for state: ControlState = .normal)

    Parameters

    text

    A text that should be applied

    state

    Specific control state for this text

  • Applies the text for specific control states

    Declaration

    Swift

    public func setText(_ text: ControlStateText)

    Parameters

    text

    A control state text that should be applied.

  • Applies the text for passed states.

    Declaration

    Swift

    public func setText(_ text: Text, for states: [ControlState])

    Parameters

    text

    The text that should be applied

    states

    An array of states for passed text

  • Applies the texts for passed states.

    Declaration

    Swift

    public func setTexts(_ texts: [ControlState : Text])

    Parameters

    texts

    A dictionary of texts associated by key with specific state