获取正在输入内容在UITextView占用了多少行

UIFount有个属性可以测量高度的文本行   

 NSInteger numberLines = textView.contentSize.height / textView.font.lineHeight;

原文地址:https://www.cnblogs.com/gaojingxuan/p/5224543.html