title: How to programmatically create UIView with this setup?
body: <p>I'd like to create a UIView programmatically with the exact equivalent of this setup in IB (see screenshot).</p>
  
  <p>Whatever I have attempted myself would not behave the same when rotating and autoresizing the view, so I need a sample from an expert.</p>
  
  <p><img src="https://i.stack.imgur.com/1Rmkx.png" alt="UIView in IB"></p>