-(void)EBAddKEyBoardNotic
{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillChangeFrame:) name:UIKeyboardWillChangeFrameNotification object:nil];
}
-(void)EBRemoveKeyBoardNotic
{
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillChangeFrameNotification object:nil];
}
- (void)keyboardWillChangeFrame:(NSNotification *)notification
{
NSDictionary *userInfo = notification.userInfo;
[UIView animateWithDuration:[[userInfo objectForKey:UIKeyboardAnimationDurationUserInfoKey] floatValue] animations:^{
NSDictionary* d = [notification userInfo];
CGRect r = [d[UIKeyboardFrameEndUserInfoKey] CGRectValue];
CGRect frame = self.view.frame;
frame.origin.y = CGRectGetMinY(r) - (CGRectGetHeight(frame) + 20 + 44 + 35);//状态栏 导航栏 + wmpage标签高度
self.view.frame = frame;
}];
}