Consider I have the following text in a UILabel (a long line of dynamic text):
UILabel
Since the alien army vastly outnumbers the team, players m
The easiest and better way that worked for me was to apply height constraint to label and set the priority to low, i.e., (250) in storyboard.
So you need not worry about calculating the height and width programmatically, thanks to storyboard.