Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想通过点击 UITextField 键盘上的返回键来获得回车/换行。我发现, textFieldShouldReturn 被调用。
但是如何在文本字段中插入回车呢?
您想改用 UITextView 。UITextFields 用于单行输入,而 UITextViews 支持多行输入。