title: Minimum width for view when label is controlling width
body: <p>I’ve been trying to do the following for quite some time without success.. I’m super grateful for any advice or tips.</p>
  
  <p>Imagine having a <code>UIView</code> that has a fixed height and that’s horizontal/vertical in whatever superview it’s implemented in. Imagine that the view has a <code>UILabel</code> that controls its width.</p>
  
  <p>How can you now set a minimum width for that <code>UIView</code>? Just in case the <code>UILabel</code> is empty or has a 2 character string, I’d like the <code>UIView</code> to have at least 50 pix width.</p>
  
  <p>Here's a visual example:</p>
  
  <p><a href="https://i.stack.imgur.com/BKDeb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BKDeb.png" alt="Visual example"></a></p>
  
  <p>Imagine the UILabel having no text. Then the UIView would have 0 width. That's the problem I'm trying to solve.</p>