Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Initial iPhone virtual keyboard display is slow for a UITextField. Is this hack around required?

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.

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

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?

like image 212
Chris Miles Avatar asked Mar 01 '23 03:03

Chris Miles


1 Answers

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.

like image 136
Ole Begemann Avatar answered Mar 16 '23 00:03

Ole Begemann