Vertically align text within a UILabel (Note : Using AutoLayout)

前端 未结 17 2683
忘掉有多难
忘掉有多难 2020-12-23 02:24

I am Copying the same Question asked Before Question. I have tried the solutions given and was not able to solve it since sizetofit was not effective when I

17条回答
  •  Happy的楠姐
    2020-12-23 02:54

    I had a similiar issue where there were 3 labels. The middle label could have much longer text than the other two, so its height could grow much larger.

    Like this:

    I set the middle label's bottom space constraint to be >= the bottom label.

    That solved my problem.

提交回复
热议问题