[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidChangeFrame:) name:UIKeyboardWillChangeFrameNotification object:nil];
个人认为这一个就能完成时间和高度 没必要再监听其他
- (void)keyboardDidChangeFrame:(NSNotification *)noti
{
self.duration = [noti.userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue];
NSLog(@"%f", self.duration);
NSValue *value = [noti.userInfo objectForKey:UIKeyboardFrameEndUserInfoKey];
CGSize keyboardSize = [value CGRectValue].size;
NSLog(@"%@", NSStringFromCGSize(keyboardSize));
}