title: Autolayout: Able to shrink to 2 lines when to short
body: <p>So, I have 2 labels, name them A (on the left) and B (on the right). A has <code>numberOfLines = 2</code>.</p>
  
  <p>They have horizontal spacing restrict (≥ 10)</p>
  
  <p>If B is too long, A should truncate to 2 lines, but if A should truncate (A...), then truncate B instead.</p>
  
  <p>Please guide me how to setup layout + constraint with this. This probably havs something with hugging &amp; resistance priority, but I'm not sure which values should I put to achieve my goal.</p>
  
  <p><a href="https://i.stack.imgur.com/bl7N8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bl7N8.png" alt="sample"></a></p>
  
  <p><strong>EDIT</strong></p>
  
  <p>So, due to the confusion, I'll update what should be:</p>
  
  <pre><code>Case 1: 
  This is a long long  ---  this label is long enough
  text
  
  Case 2:
  This is a long --- this label is too long it has to be trunca...
  long text
  
  Case 3:
  This is short --- this is short too.
  
  Case 4 (shouldn't be like this)
  This is a  --- this label is too long but it doesn't truncate.
  long...
  </code></pre>