我正在使用 MessageKit3.0.0-swift5
分支进行聊天。单击消息,我将展示 ViewController。当 Viewcontroller 被关闭时,我无法访问 InputBar。
有人遇到过这个问题吗?
在这里查看视频。
代码:
// MessageCellDelegate
func didTapMessage(in cell: MessageCollectionViewCell) {
self.showFileInBrowser(withTitle: "", url: fileURL)
}
func showFileInBrowser(withTitle title: String? = nil, url: URL) {
self.fileBrowser = FileBrowserViewController(title: title, url: url)
let navigation = BaseNavigationController(rootViewController: fileBrowser!)
self.present(navigation, animated: true, completion: nil)
}
// FileBrowserViewController
@objc func closeButtonTapped() {
self.dismiss(animated: true, completion: nil)
}
我也在使用IQKeyboardManager,但以下解决方案不起作用。
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
IQKeyboardManager.shared().isEnabled = false
}
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
IQKeyboardManager.shared().isEnabled = true
}