Label doesn't show all the text inside scrollView

前端 未结 4 1524
渐次进展
渐次进展 2021-01-03 15:18

I want the DecriptionLabel (the Lorem Ipsum one) to have all the text inside it visible. As you can see, it is getting trimmed.

The two buttons should b

4条回答
  •  误落风尘
    2021-01-03 15:43

    Add the following constraint:

    scrollview.contentview.height >= safearea.height
    

    This may show an error in interface builder but works in my tests:

    To remove the design time error you could set a design time intrinsic content size for the scrollview's contentview (in my case I used the safe area's height of 554):

    Another option (without placeholder values in IB) is to create the following constraint...

    scrollview.contentview.height = safearea.height
    

    ... and change its priority to a value lower than the label's vertical content compression resistancy.

提交回复
热议问题