title: How to put two labels horizontally by aligning their top edges in iOS?
body: <p>I want to create custom view like below.</p>
  <p><a href="https://i.stack.imgur.com/OyMdY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OyMdY.png" alt="enter image description here" /></a></p>
  <p>As you see, it consists from title and price labels. Title can have million number of lines, but its top edge should be aligned with price label. It seems simple design, but it has hundreds of solution. I tried every of them, but my title label is not growing, by having dots at the end (numberOfLines = 0 doesn't help). Here is how I approached to create such a design:</p>
  <ol>
  <li><p>I created titleLabel with top, leading, trailing to price label, bottom constraints. Also, I created price label with top and trailing constraints only in order to align their top edges. I assigned compression resistance and hugging priority to price label, because it is more important and should not be ruined. Here is code if you want:</p>
  <pre><code> addSubview(titleLabel)
   addSubview(priceLabel)
   titleLabel.snp.makeConstraints { make in
       make.leading.equalToSuperview().offset(16)
       make.trailing.lessThanOrEqualTo(priceLabel.snp.leading).offset(-8)
       make.top.equalToSuperview()
       make.bottom.equalToSuperview()
   }
   priceLabel.snp.makeConstraints { make in
       make.trailing.equalToSuperview().offset(-16)
       make.top.equalTo(titleLabel.snp.top)
   }
  </code></pre>
  </li>
  </ol>
  <p>I created separate custom view, because I want to use it inside <strong>StackView</strong>(spacing 8, distribution fill, vertical). Result of this approach: title label's is not growing. It has only one line with dots at the end, if it has big text.</p>
  <ol start="2">
  <li>Second approach was to create stackView (horizontally, spacing 8, distribution fill, alignment top). I set alignment top in order to align top edges of the labels. The result was the as in approach #1.</li>
  </ol>
  <p>How to solve this problem? Where am I wrong? It seems I don't see something core in Auto Layout theory here.</p>