I have a UIButton
and it can change the title at the runtime. Therefore, I want to increase the UIButton
height depend on the title text for displa
There is a way I always used:
Done. :)
PS1. This way can be used for the button and ref-label in a scrollview.
PS2. In some case, we can not get the correct height of the ref-label because it cannot gain a correct frame.width in scrollview, especially when we use the trailling constraint. We could consider to define a fixed width to the ref-label before sizeTofit and obtain the correct height for target button use.