-(Void) viewDidLoad
{
[Super viewDidLoad];
[[Nsicationcenter center defacenter center] addObserver: self selector: @ selector (keyboardWillShow :) name: UIKeyboardWillShowNotification object: nil];
}
-(Void) didReceiveMemoryWarning
{
[Super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
[[Nsicationcenter center defacenter center] removeObserver: self];
}
-(Void) keyboardWillShow :( NSNotification *) notification {
NSDictionary * info = [notification userInfo];
CGSize kbSize = [[info objectForKey: UIKeyboardFrameEndUserInfoKey] CGRectValue]. size;
//
NSValue * animationDurationValue = [info objectForKey: UIKeyboardAnimationDurationUserInfoKey];
NSTimeInterval animationDuration;
[AnimationDurationValue getValue: & animationDuration];
NSLog (@ "keyboard changed, keyboard width = % f, height = % f, animationDuration = % f ",
KbSize. width, kbSize. height, animationDuration );
}