I have button with text in stack view, and on button init this text is short, but when I click on this button text is changing for longer text, but height of this button is not good.
I set this properties on button, but still not working
button.titleLabel?.lineBreakMode = .byWordWrapping
button.titleLabel?.textAlignment = .left
button.titleLabel?.numberOfLines = 0
How can I get dynamic size of button depending on text length?