title: Force a view to take as much space as possible inside UIStackView
body: <p>I'm creating part of my application's UI with Swift and the problem I'm facing is I have a <code>UIStackView</code> with 3 sub views: 2 UILabels and an UIImageView. Here is my first code</p>
  
  <pre><code>let switchview = UISwitch()
  let nodelableview = UILabel()
  nodelableview.textAlignment = NSTextAlignment.right
  nodelableview.numberOfLines = 0
  nodelableview.text = nodes[i].type + " " + nodes[i].node_name
  let statLabel = UILabel()
  statLabel.textAlignment = NSTextAlignment.left
  statLabel.text = nodes[i].stat
  let stack = UIStackView()
  stack.axis = .horizontal
  stack.spacing = 16
  stack.addArrangedSubview(statLabel)
  stack.addArrangedSubview(nodelableview)
  stack.addArrangedSubview(switchview)
  cell.nodesView.addArrangedSubview(stack)
  </code></pre>
  
  <p>the problem with this code is that when the <code>nodelabelview</code> has long text the UIStackView not extending to make space for 2 or more lines. So I set the alignment to <code>.center</code> and here is the result
  <a href="https://i.stack.imgur.com/7BkVm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/7BkVm.png" alt="enter image description here"></a></p>
  
  <p>There is empty space left but the first <code>UILabel</code> is using it for nothing. How can I force the second <code>UILabel</code> to use available spaces? </p>