I have five ui labels for one view. All of them have variable text content. To prevent truncating I have to use Autoshrink text size. My ui labels are aligned in x axis top to bottom. The problem is; when autoshrinking, all ui labels have different font sizes. Is there a way to equalize font sizes of all ui labels when autoshrink. I use interface builder autolayout constraints. Thank you.
[SOLVED] Autoshrinking text size for multiple ui labels
answered Theresa 2018-10-22
You could loop through your labels, find the smallest text size and then set that text size to all of them. That way, you know they'll all fit and have the same text size. You would have to do this programmatically. Alternatively, you could dynamically change the size of your UILabels based on the number of characters it holds times some constant factor. That way, the autoshrink should set the same size for each the text in each of the labels.