How to calculate height of a multiline String in Swift

Yesterday I spent like 2 hours trying to find answer to this question. Eventually I had to figure it out on my own using a bunch of Stackoverflow answers, each of which, if used alone, didn’t produce the desired result.

So, here is what I came up with. It works!

 

Facebooktwittergoogle_plusredditpinterestlinkedinmail

5 thoughts on “How to calculate height of a multiline String in Swift”

Leave a Reply

Your email address will not be published. Required fields are marked *