textView should not resignFirstResponder in here，some times we want to stop input when detected \n’, but don’t want to dismiss keyboard.  if need to dismiss keyboard,  the best way is add resignFirstResponder in the delegate’s callback function.