Looked intoUIKeyboardAnimationDurationUserInfoKey
but I just can't find anywhere how to set it to a custom value.
views:
184answers:
1
+3
A:
UIKeyboardAnimationDurationUserInfoKey
is a const string identifier for the dictionary key that holds the animation duration, not sure you can change it easily.
One way to make the keyboard appear without animation is to observe the keyboard notifications and disable animation when it's about to appear and then reenable them. This of course disables any other animation as well.
[[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];
}
and then then the same for UIKeyboardWillHideNotification/UIKeyboardDidHideNotification
notifications.
monowerker
2009-12-05 10:01:04