title: How to constrain a view to a UITextView's first baseline?
body: <p>I'm desperately trying to constrain the first baselines of a <code>UILabel</code> and a <code>UITextView</code> in Interface Builder. From my understanding this should be quite easy by simply adding the following constraint (Pseudo-Code):</p>
  
  <pre><code>label.firstBaseline = textView.firstBaseline
  </code></pre>
  
  <p>However, depending on the other constraints and some view settings I get really awkward results as shown in the following screenshots.</p>
  
  <h3>1st Case: Disable scrolling & Align the top edges</h3>
  
  <p>This is only for showing the general view setup. I have disabled scrolling for the <code>textView</code> to avoid ambiguity. (Otherwise the <code>textView</code> cannot calculate its own height from its containing text.)</p>
  
  <p><a href="https://i.stack.imgur.com/UImSS.png" rel="noreferrer"><img src="https://i.stack.imgur.com/UImSS.png" alt="1st case: Align top edges of both views"></a></p>
  
  <h3>2nd Case: Disable scrolling & align the first baselines</h3>
  
  <p>Same setup as in the 1st case with the only difference that I have removed the constraint that aligns the top edges of the views and added a constraint that aligns the first baselines of the views instead.</p>
  
  <p>For some reason, the label "takes off" well beyond the bounds of its superview and ends up at a y position of 7764. No idea why.</p>
  
  <p><a href="https://i.stack.imgur.com/ERbqX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ERbqX.png" alt="2nd case: Align first baselines"></a></p>
  
  <h3>3rd Case: Constrain height & align the first baselines</h3>
  
  <p>Now I have scrolling enabled for the <code>textView</code> and constrained its height instead.</p>
  
  <p>Obviously the <code>label</code>'s first baseline gets aligned with the <code>textView</code>s top edge even though the constrained says to align both their first baselines. I read in the Apple docs that the <code>firstBaseline</code> parameter returns a view's top edge if that view doesn't have a baseline. So it seems that the <code>textView</code> doesn't have a first baseline in this scenario.</p>
  
  <p><a href="https://i.stack.imgur.com/L6lqm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/L6lqm.png" alt="3rd case: Align first baselines and add height constraint"></a></p>
  
  <p>Does a <code>UITextView</code> in general have no <code>firstBaseline</code>?
  And if so: Why? After all, it's a view that draws text and thus this property should be set.</p>
  
  <p>Any thoughts on this are appreciated.</p>