قالب وردپرس درنا توس
Home / IOS Development / Please help scale button height to fill UILABLE height ..: iOSProgramming

Please help scale button height to fill UILABLE height ..: iOSProgramming



Hello, sorry to ask this, but I have been turning for 3 hours already .. Could not find the right answer. Basically, my question is this:

What limitations and attributes should I search for a button to scale its height if UITitle inside a button becomes larger than the button's width ? I have a trailing and leading limitation set to 16, and top limit set to 50 for UIButton. However, if the title becomes too long, it will not scale UIbutton height:

  Post image

I tried to set the button to scaleToFit (), but if the title is short, when the button becomes short as well. I just need to resize it if the title expands the maximum button width !

In android we have something like wrap_content. A single line does it 🙂


Source link