title: iOS Auto Layout: 3 column label layout, with middle column having variable width
body: <p>I'm trying to create something that I thought would be easy using Auto Layout for iOS. I've been on this for days, bought a book, and tried various keyword search combinations. Anyone done this before and could point me in the right direction?</p>
  
  <p><strong>I want 3 UILabels, arranged in columns, with the middle one (which has more content) to be variable width depending on orientation of iPad.</strong></p>
  
  <p>I can get this to work, but once the iPad rotates from landscape to portrait (and therefore reduces the width available to the middle label) the middle label content gets cut off.
  i.e. the middle label height doesn't resize.</p>
  
  <p>This is what I want to achieve:
  <img src="https://i.stack.imgur.com/WbF5W.png" alt="This is what I want to achieve"></p>
  
  <p>Once you rotate to portrait:
  <img src="https://i.stack.imgur.com/mUzQc.png" alt="Once you rotate to portrait"></p>
  
  <p>Here are my constraints and View hierarchy:
  <img src="https://i.stack.imgur.com/8YbCj.png" alt="Here are my constraints and View hierarchy"></p>
  
  <p>If I give the middle UILabel a height constraint of 'less than or equal to' 250 (the height it needs to show all content in narrow portait mode), once the iPad orientates back to landscape the label content expands to fit the new width but also no longer aligns nicely with the tops of the other labels on either side.</p>
  
  <p>Wrong vertical alignment
  <img src="https://i.stack.imgur.com/vKRTp.png" alt="wrong alignment"></p>
  
  <p>Here's my constraints on the middle label
  <img src="https://i.stack.imgur.com/BgV88.png" alt="constraints on middle label"></p>
  
  <p>(that Height equal 250 has a priority of 1, as it was a generated constraint that I cant get rid of.)</p>
  
  <p>I've tried so many combinations of content hugging and compression resistance, I was sure that that would have been the answer, i.e. requiring the UILabel frame to hug the content. I obviously don't understand that as well as I should.</p>