UITextField的初始iPhone虚拟键盘显示速度很慢。这需要破解吗? [英] Initial iPhone virtual keyboard display is slow for a UITextField. Is this hack around required?

查看:115
本文介绍了UITextField的初始iPhone虚拟键盘显示速度很慢。这需要破解吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有UITextField的应用程序,等等。当用户首次点击文本字段时,在出现虚拟键盘之前会有明显的延迟。在3GS上它不是太明显,但在较旧的iPhone上,延迟可能在1秒左右。之后,键盘会立即弹出。延迟只是在应用启动后键盘弹出的第一次。

I have an app with a UITextField, amongst other things. When the user first taps on the text field, there is a noticeable delay before the virtual keyboard appears. On a 3GS it isn't too obvious, but on an older iPhone the delay can be around 1 second. After that the keyboard always pops up instantly. The delay is only the first time the keyboard pops up after app startup.

看起来初始的UIKeyboard实例化需要一些时间(相当多......)但是在此之后保持不变。

It looks like the initial UIKeyboard instantiation takes some time (quite a bit...) but is kept around after that.

我发现很少有关于此的信息,这让我感到惊讶。但是我确实发现了这个问题以及黑客解决方案。

I found very little information about this, which surprised me. However I did find this write up of the issue along with a hack-around solution.

http://blog.weareuproar.com/preloading-the-uikeyboard

我的问题是:是这个黑客围绕唯一可用的解决方案?有没有办法用信号通知框架(例如通过信息plist?)在启动时实例化键盘?

My question is: is this hack around the only available solution? Is there a way to signal the framework (e.g. via info plist?) to instantiate the keyboard on startup?

推荐答案

不,那里没有其他(记录)的方式来做到这一点。甚至Apple的内置应用程序(例如Maps)也会遇到同样的问题。您可以选择与您链接的黑客,也可以遵循Apple的建议,在您真正需要之前不要提前加载。顺便说一下,iPhone 3Gs和新款iPod touch不再是一个问题。更新更快的设备几乎可以立即加载键盘。

No, there is no other (documented) way to do that. And even Apple's built-in apps (such as Maps) suffer from the same problem. You can either go with the hack you linked to or follow Apple's advice to not load stuff in advance before you really need it. By the way, this isn't much of an issue anymore with the iPhone 3Gs and the new iPod touch. The newer and faster devices load the keyboard almost instantly.

这篇关于UITextField的初始iPhone虚拟键盘显示速度很慢。这需要破解吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆