title: Dynamically resizing text view in Swift
body: <p>I'm working on a simple trivia app. The main screen uses a text view to allow for larger questions than what could fit in a text field. The problem with this, is that the text view is unsightly when it's larger than the question. I already can do a limited form of dynamic resizing by counting the amount of characters in the string, and resizing it that way. However, sometimes this doesn't work perfectly as can be seen <a href="https://i.stack.imgur.com/JJYCe.png" rel="nofollow noreferrer">here</a>;
  also if it's taken to another device besides an iPhone X, the resizing will be way off.</p>
  
  <p>Is there a way for me to count the number of lines in a text view after text wrapping?</p>