注册通知
{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:)name:UIKeyboardWillShowNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:)name:UIKeyboardWillHideNotification object:nil];
}
注销通知
[[NSNotificationCenter defaultCenter] removeObserver:self];
回调
- (void)keyboardWillShow:(NSNotification *)notification;
{
}
- (void)keyboardWillHide:(NSNotification *)notification;
{
}