1

I have two UILabel inside horizontal stack view with alignment top and distribution fill.enter image description here

The problem is second label is taking too much space rather than its intrinsic content size.

I also had set content hugging priority of second label to .high but still it's taking too much space. Is there any missing do I need to implement or any ways to fix it.

noob
  • 545
  • 6
  • 23
  • I assume you have set the **Lines** of your long long text label to 0. If that is the case, your second label should auto fill the space although you set the hugging priority. – Imrul Kayes May 20 '18 at 09:19

1 Answers1

1

I found a way to solve this. Set contentHugging priority to .required for Horizontal axis.

noob
  • 545
  • 6
  • 23