MessageKit Version: 0.1.0
iOS Version(s): 10.3.2
Swift Version: 4
Devices/Simulators: iPhone6s Simulator
Reproducible in ChatExample? (Yes/No): No
When I go to ChatViewController and come back to previous ViewController, the input bar at the bottom is still available with the following warning/error message
[View] First responder warning: '<MessageKit.InputTextView: 0x7fcf6689ea00; baseClass = UITextView; frame = (12 6; 291 30); text = ''; clipsToBounds = YES; gestureRecognizers = <NSArray: 0x60000064ff30>; layer = <CALayer: 0x600000628fc0>; contentOffset: {0, 0}; contentSize: {0, 28.5}; adjustedContentInset: {0, 0, 0, 0}>' rejected resignFirstResponder when being removed from hierarchy
2017-11-02 18:15:48.045937+0530 KMIAPP[13223:141996] [Snapshotting] Snapshotting a view (0x7fcf66025600, UIKeyboardImpl) that is not in a visible window requires afterScreenUpdates:YES.
The Input Bar must be removed once I navigate away from ChatViewController. I am not sure what is causing this. I am using IQKeyboardManager and I tried disabling it. The problem still exist.
Upon further testing, this issue is a conflict with IQKeyboardManager and related to #309
The solution to this issue is to disable IQKeyboardManager in the viewDidDisappear() instead of viewWillDisappear() here is the code for reference.
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
IQKeyboardManager.sharedManager().enable = false
}
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
IQKeyboardManager.sharedManager().enable = true
}
Since this remains solved. I am closing this issue.
Most helpful comment
Upon further testing, this issue is a conflict with
IQKeyboardManagerand related to #309The solution to this issue is to disable
IQKeyboardManagerin theviewDidDisappear()instead ofviewWillDisappear()here is the code for reference.Since this remains solved. I am closing this issue.