How to get height of UILabel, UITextView in Swift after dynamic resize
<p>I have a UILabel and a UITextView created in storyboard that both change height to  fit the text that is passed into them. I need to fetch the height of both of them programmatically in order to size my view correctly (view embedded in scroll view), but when I run this code in their view controller, it gives me the height defined in storyboard rather than the resized height. articleText is my text view, and articleLabel my label.</p>

<pre><code>articleText.attributedText = largeTextString
articleLabel.attributedText = labelString

print(articleText.contentSize.height) 
print(articleLabel.bounds.size.height)
// Both return storyboard value, not resized value
</code></pre>

<p>Thanks in advance!</p>