[英]Close soft keyboard on iOS / Android
How can I close the soft keyboard on both Android and iOS? 如何关闭Android和iOS上的软键盘?
It seems to linger after the input field is already gone ( moved on to the next view ). 输入字段已经消失(移至下一个视图)之后,似乎仍然存在。
On iOS, you must call: 在iOS上,您必须调用:
[textView resignFirstResponder];
when the user is done editing. 用户完成编辑后。 You can tell when the user is done in the
-(BOOL)textFieldShouldEndEditing:(UITextField *)textField
function 您可以在
-(BOOL)textFieldShouldEndEditing:(UITextField *)textField
函数中告诉用户何时完成操作
On Android, hopefully someone else can give you a good answer. 在Android上,希望其他人可以给您一个很好的答案。
按返回箭头以退出键盘
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.