通过 Adob​​e AIR 关闭 iOS 上的软键盘

发布于 2024-12-27 03:16:17 字数 228 浏览 2 评论 0原文

...有办法做到这一点吗?

我正在开发一个游戏项目,其中 iPad 会公开展示,玩家可以在分数提交表单中输入他们的姓名和电子邮件。但是,如果设备在 120 秒内无人看管,则会自动返回标题屏幕。问题是,如果在软键盘仍然打开的情况下发生这种情况,并且超时发生并且文本字段和键盘随后仍然显示(直到有人手动关闭它),则软键盘不会关闭。不用说,这非常糟糕。还没找到这方面的API。也许有解决方法?将焦点放在其他事情上似乎并不能解决问题。

... any way to do this?

I'm working on a game project where iPads are displayed in public and players can enter their names and email into a score submit form. However if the device is left unattended for 120 seconds after that it goes automatically back to the title screen. The problem is that if this happens while the softkeyboard is still open, it will not be closed if the timeout happens and the textfield and keyboard are still displayed afterwards (until somebody closes it manually). Needless to say that this is very bad. Haven't found any API on this. Maybe there's a workaround? Setting focus to something else seems not to cut it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

北城孤痞 2025-01-03 03:16:17

想通了!将焦点设置为 null 就可以了!

Figured it out! Setting focus to null does the trick!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文