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

后端 未结 4 1773
再見小時候
再見小時候 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:33

    In Xcode 6.1, I had to set Content Compression Resistance Priority to a higher value, likely because I have other constraints that were conflicting, or causing the sizeToFit option to be disabled.

    Content Compression Resistance Priority Before: Before After: After

提交回复
热议问题