@@ -16,8 +16,12 @@ public extension UIButton {
1616 /// - text: The text to be displayed in the label.
1717 /// - textStyle: Text style object containing style information.
1818 /// - markups: Custom markup if there is any. Defaults to zero custom markup.
19- func setTitleText( _ text: String , using textStyle: TextStyle , customMarkup markups: Markup = [ : ] ) {
20- setAttributedTitle ( attributedMarkupString ( from: text, using: textStyle, customMarkup: markups) , for: . normal)
19+ /// - state: The button state to set.
20+ func setTitleText( _ text: String ,
21+ using textStyle: TextStyle ,
22+ customMarkup markups: Markup = [ : ] ,
23+ forState state: UIControlState = . normal) {
24+ setAttributedTitle ( attributedMarkupString ( from: text, using: textStyle, customMarkup: markups) , for: state)
2125 }
2226
2327 /// Sets the button's title text to an attributed string created from the specified string and text style.
@@ -27,8 +31,11 @@ public extension UIButton {
2731 /// - Parameters:
2832 /// - markdownText: The Markdown text to be displayed in the label.
2933 /// - textStyle: Text style object containing style information.
30- func setMarkdownTitleText( _ markdownText: String , using textStyle: TextStyle ) {
31- setAttributedTitle ( attributedMarkdownString ( from: markdownText, using: textStyle) , for: . normal)
34+ /// - state: The button state to set.
35+ func setMarkdownTitleText( _ markdownText: String ,
36+ using textStyle: TextStyle ,
37+ forState state: UIControlState = . normal) {
38+ setAttributedTitle ( attributedMarkdownString ( from: markdownText, using: textStyle) , for: state)
3239 }
3340
3441}
0 commit comments