swift - UIButton's textLabel not being clipped -
i have uibutton,and set text this:
let mybutton ... mybutton.textlabel?.text = "abcdefghijklmn"
but when run ,the text clipped. how uibutton auto resize fit inner text.
here screenshot.
what want this:
abcdefghijklmn
option a: mybutton.sizetofit()
option b: use layout constraints don't constrict label's width
Comments
Post a Comment