ios - Objective C - TextView Number of Lines -


i have problem. know how can exact number of written lines of text in text view . not want number of lines possible, have been used , filled characters.

for example:

in case result 2. in case result 3.

you try going along lines of

[textfield sizetofit]; //get minimum height , width text nsinteger numlines = textfield.frame.size.height / textfield.font.linehieght 

however haven't tried myself


Popular posts from this blog