[[NSNotificationCenterdefaultCenter]addObserver:self
selector:@selector(keyboardWillShow:)
name:UIKeyboardWillShowNotification
object:nil];
[[NSNotificationCenterdefaultCenter]addObserver:self
selector:@selector(keyboardShow:)
name:UIKeyboardDidShowNotification
object:nil];
[[NSNotificationCenterdefaultCenter]addObserver:self
selector:@selector(keyboardWillHide:)
name:UIKeyboardWillHideNotification
object:nil];
[[NSNotificationCenterdefaultCenter]addObserver:self
selector:@selector(keyboardHide:)
name:UIKeyboardDidHideNotification
object:nil];