会话 页面,

1,层被 盖住了,tableview从天上来

2,textview 多行,field单行,

3,contentoffset,contentinset,

4,keyboad 发通知,获取 duration时间,保持同步,

5,

- (void)keyboardWillShow:(NSNotification*)notification {

    CGRect _keyboardRect = [[[notification userInfo] objectForKey:_UIKeyboardFrameEndUserInfoKey] CGRectValue];

    [UIViewbeginAnimations:nilcontext:nil];

    [UIViewsetAnimationDelegate:self];

    [UIViewsetAnimationCurve:UIViewAnimationCurveEaseInOut];

    [UIViewsetAnimationDuration:[[[notification userInfo] objectForKey:UIKeyboardAnimationDurationUserInfoKey] floatValue]];

    self.inputView.frame = CGRectMake(self.inputView.frame.origin.x, SharedAppDelegate.window.frame.size.height - 20-_keyboardRect.size.height - self.inputView.frame.size.height, self.inputView.frame.size.width, self.inputView.frame.size.height);

    self.tableView.contentOffset = CGPointMake(self.tableView.contentOffset.x, _keyboardRect.size.height + self.inputView.frame.size.height);

    self.tableView.frame = CGRectMake(self.tableView.frame.origin.x, self.tableView.frame.origin.y, self.tableView.frame.size.width, self.inputView.frame.origin.y - 44);

    [UIViewcommitAnimations];

   }

转载于:https://www.cnblogs.com/guligei/p/3240600.html

你可能感兴趣的:(会话 页面,)