how to make UILabel autosize text in storyboard (or interface builder), NOT programmatically

后端 未结 4 1850
再見小時候
再見小時候 2021-02-03 17:04

Every time I click-and-drag a UILabel to storyboard, and then add text to Text field, the text is cut off, so I then have to click-and-drag the UILabel to stretch it big enough

4条回答
  •  没有蜡笔的小新
    2021-02-03 17:47

    For the text label:

    Set Lines to 0

    Set Height to Greater than or equal to 30 (or other value)

    Now the height will be adjusted based on the lines number.

提交回复
热议问题