I had a problem when I needed to animate the translation of the label vertically by the same distance of the text textField. In most cases, only textField.bounds.heigt , but if the height of the textField is greater than the height of the text, this will not be good for me. So I need to know: How to calculate the height of a line of text of a line from its UIFont ?
As for the duplicate: There is a little different from what I need. this answer (to which I referred in my answer) gets the overall height depending on 1) line 2) width 3) font. What I needed was the height of one line, dpending only on the font .
string ios height swift uifont
Ismail
source share