In most iPhone apps, there\'s a quite a bit of delay the first time that the keyboard is presented (presumably creating the keyboard takes quite a bit of o
Once a user complain my app of the slow loading keyboard. Here is a little trick to disable the keyboard animation:
- (void)viewDidLoad
{
[super viewDidLoad];
// ...
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(willShowKeyboard:)
name:UIKeyboardWillShowNotification
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(didShowKeyboard:)
name:UIKeyboardDidShowNotification
object:nil];
// ...
}
- (void)willShowKeyboard:(NSNotification *)notification
{
[UIView setAnimationsEnabled:NO];
}
- (void)didShowKeyboard:(NSNotification *)notification
{
[UIView setAnimationsEnabled:YES];
}
It may not answer the question directly, as the keyboard itself is in the main UI for my example and caching is not the option to me. Nevertheless, the overall responsiveness is improved.