Closed HelloWilliam closed 3 years ago
已解决
- (void)keyBoardWillHide:(NSNotification *)note
{
// 定义好动作
void (^animation)(void) = ^void(void) {
[self.chatBar Ease_updateConstraints:^(EaseConstraintMaker *make) {
make.bottom.equalTo(self.view);
}];
[self performSelector:@selector(scrollToBottomRow) withObject:nil afterDelay:0.01];
[self.view layoutIfNeeded];//动画变化
};
[self keyBoardWillHide:note animations:animation completion:^(BOOL finished) {
}];
}
里面增加了
[self performSelector:@selector(scrollToBottomRow) withObject:nil afterDelay:0.01];
下面2种测试都是基于内容contentsize超出一屏
1、键盘弹出,点击空白处,键盘收回,显示最后一条消息,正常!
2、键盘弹出,发送一条消息,点击空白处,键盘收回,未显示最后一条消息,显示倒数第二条或者第三条消息
是哪边约束设置的有问题吗?