点击系统键盘的语音按钮,导致输入工具栏被遮挡

点击系统键盘的语音按钮,导致输入工具栏被遮挡
发布时间: 2017-10-18 17:13

回答:

在聊天页面的 viewDidLoad 监听键盘通知

[[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(rcInputBar_didReceiveKeyboardWillShowNotification:)
                                             name:UIKeyboardWillShowNotification
                                           object:nil];
- (void)rcInputBar_didReceiveKeyboardWillShowNotification:(NSNotification *)notification {
    [self.chatSessionInputBarControl.inputTextView becomeFirstResponder];
}