AutoLayout setting UILabel height to zero

前端 未结 5 1544
暗喜
暗喜 2021-02-14 01:40

I have a UILabel for item description amongst other views, all laid out using constraints in Interface Builder - you can see all relevant constraints in the image b

5条回答
  •  攒了一身酷
    2021-02-14 02:43

    AutoLayout in this UIViewController can't satisfy all the constraints you have set, therefore it dismiss those on your UILabel, resulting in a compressed state. You should have a look at the other constraints in your UIViewController, and set the priority of the height contraint to a higher number.

提交回复
热议问题