title: Fit UILabel size to its content with autolayout. Fit width and height
body: <p>I have found <a href="https://stackoverflow.com/questions/16009405/uilabel-sizetofit-doesnt-work-with-autolayout-ios6">this solution</a> how to fit <code>UILabel</code> height to its content. It works perfect for example if I follow suggested instruction and modify vertical <strong>ContentHuggingPriority</strong> and vertical <strong>ContentCompressionResistancePriority</strong>. So then storyboard automatically fit UILabel height to text height. If I make the same for horizontal <strong>ContentHuggingPriority</strong> and <strong>ContentCompressionResistancePriority</strong> and edit <code>UILabel</code> width constraint priority, <code>UILabel</code> fits width to text width.</p>
  
  <p>My question is how to set parameters to fit size as for text height and as for text width? Because seems we can only fit or hight or width of UILabel content.</p>