I had a previous post where I asked if there is any other method than this :
var maxNumberOfLines: CGFloat = 3
var numLines = textView.contentSize.height/textView.font.lineHeight
if (numLines > maxNumberOfLines)
{
textView.text = (textView.text as NSString).substringToIndex((textView.text as NSString).length - 1)
}
for limiting user's input.
I ask this, because I want to know what I should change in order to block it from passing the second line.
With the method above, I can still press the return key, it goes down to the third line, and if I try to type anything, it goes back up on the second.