I am trying to create a UiTextView that only can enter in 50 characters and should not be more than two lines in length and when the return is pressed close the keyboard.Tried various ways based on many stackover but none seem to fix the issue. Not sure way it has to be so hard to do.Any help would be appreciate
Currently using
func textView(textView: UITextView!, shouldChangeTextInRange: NSRange, replacementText: NSString!){
if let range = text.rangeOfCharacterFromSet(NSCharacterSet.newlineCharacterSet()) {
println("start index: \(range.startIndex), end index: \(range.endIndex)")
}
else {
println("no data")
}
}