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
This is one line of code to get the UILabel Height using Objective-c:
labelObj.numberOfLines = 0; CGSize neededSize = [labelObj sizeThatFits:CGSizeMake(screenWidth, CGFLOAT_MAX)];
and using .height you will get the height of label as follows:
neededSize.height