We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在聊天页面发送图片,如果图片过多时,在输入文字键盘弹出时点击语音按钮出现卡死现象。
The text was updated successfully, but these errors were encountered:
-(void)keyboardChange:(NSNotification *)notification { NSDictionary *userInfo = [notification userInfo]; NSTimeInterval animationDuration; UIViewAnimationCurve animationCurve; CGRect keyboardEndFrame;
[[userInfo objectForKey:UIKeyboardAnimationCurveUserInfoKey] getValue:&animationCurve]; [[userInfo objectForKey:UIKeyboardAnimationDurationUserInfoKey] getValue:&animationDuration]; [[userInfo objectForKey:UIKeyboardFrameEndUserInfoKey] getValue:&keyboardEndFrame]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:animationDuration]; [UIView setAnimationCurve:animationCurve]; //adjust ChatTableView's height if (notification.name == UIKeyboardWillShowNotification) { self.bottomConstraint.constant = keyboardEndFrame.size.height+40; //弹出键盘时,立马刷新 [self.view layoutIfNeeded]; }else{ self.bottomConstraint.constant = 40; //弹去键盘时,等下一个时间片执行 [self.view setNeedsLayout]; } //图片过多时,键盘弹下去用此方法会主线程堵塞
// [self.view layoutIfNeeded];
//adjust UUInputFunctionView's originPoint CGRect newFrame = IFView.frame; newFrame.origin.y = keyboardEndFrame.origin.y - newFrame.size.height; IFView.frame = newFrame; [UIView commitAnimations];
}
Sorry, something went wrong.
#import "SChatController.h" 在这个类里面修改就好了。
ok, 我去看看。没有注意到这些点。thks
ZhipingYang
No branches or pull requests
在聊天页面发送图片,如果图片过多时,在输入文字键盘弹出时点击语音按钮出现卡死现象。
The text was updated successfully, but these errors were encountered: