Using Auto Layout, how do I make two labels on the same “line” be dynamic in their widths (adjusting with how wide each one needs to be)?

后端 未结 2 1821
忘了有多久
忘了有多久 2021-02-12 11:16

Say I have two UILabels, one is a URL and one is a timer:

[http://website.com/link/to/specific/story] [9m 42s]

But the \"timer\" UILabel change

2条回答
  •  渐次进展
    2021-02-12 11:29

    You should set the compression resistance, URL label must have lower value;

    Set the horizontal space between labels to constant (for example zero or default);

    Set width for each label and select "less than" or "greater that" relation, these values set limits for shrinking/expanding of the view.

提交回复
热议问题