In IB's library, the introduction tells us that when the return key is pressed, the keyboard for UITextView will disappear. But actually the return key can only act as '\n'.
我可以添加一个按钮并使用[txtView resignFirstResponder]隐藏键盘。
But is there a way to add the action for the return key in keyboard so that I needn't add UIButton?