关闭 iphone 键盘 [英] Dismiss iphone keyboard
本文介绍了关闭 iphone 键盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试重新创建类似于 safari 中使用的弹出式键盘的东西.
I am trying to recreate something similar to the popup keyboard used in safari.
我可以通过在我的视图和适当的按钮上放置一个工具栏来直观地重现它,但是一旦用户触摸完成按钮,我无法想出任何方法来关闭键盘.
I am able to visually reproduce it by placeing a toolbar over my view and the appropriate buttons, however i cant figure out any way to dismiss the keyboard once the user has touched the done button.
推荐答案
您是否尝试过:
[viewReceivingKeys resignFirstResponder];
其中 viewReceivingKeys
是接收文本输入的 UIView?
where viewReceivingKeys
is the UIView that is receiving the text input?
这篇关于关闭 iphone 键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文