UIButton
extension UIButton
-
Applies the text for passed state
Declaration
Swift
public func setText(_ text: Text, for state: ControlState = .normal)Parameters
textA text that should be applied
stateSpecific control state for this text
-
Applies the text for specific control states
Declaration
Swift
public func setText(_ text: ControlStateText)Parameters
textA control state text that should be applied.
-
Applies the text for passed states.
Declaration
Swift
public func setText(_ text: Text, for states: [ControlState])Parameters
textThe text that should be applied
statesAn array of states for passed text
-
Applies the texts for passed states.
Declaration
Swift
public func setTexts(_ texts: [ControlState : Text])Parameters
textsA dictionary of texts associated by key with specific state
View on GitHub
UIButton Extension Reference