I have a problem. I would like to know how I can get the exact number of WRITTEN lines of a text in a text view . I do not want the number of lines possible, but those that have been used and filled by characters.
For example:
I have a problem. I would like to know how I can get the exact number of WRITTEN lines of a text in a text view . I do not want the number of lines possible, but those that have been used and filled by characters.
For example:
you could try going something along the lines of
[textField sizeToFit]; //Get the minimum height and width for the text
NSInteger numLines = textField.frame.size.height / textField.font.lineHieght
However I haven't tried it myself