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.
我正在使用 UITextView,我对让键盘消失感到困惑。我是否需要使用某种通知使其消失。谢谢
这不是很直观,但您所要做的就是doneButtonOnKeyboardPressed在视图控制器中实现事件。您实际上不必在事件处理程序中执行任何操作,只需处理它就会导致键盘在用户点击“完成”后消失。
doneButtonOnKeyboardPressed
一个空的处理程序看起来像这样:
- (IBAction) doneButtonOnKeyboardPressed:(id)sender { }