MMDrawerController
MMDrawerController copied to clipboard
Keyboard is not hiding
I'm facing some weird problem, I'm unable to hide keyboard. Here is the flow While user is editing some of textField, at that time without touching anywhere he swipes and based on that gesture opening side menu, but on side menu Keyboard is still appear. I've wrote below code. on ProfileVC (centerViewController)
override func viewWillDisappear(_ animated: Bool) {
self.view.endEditing(true)
}
on LeftMenuVC (SideViewController)
override func viewWillAppear(_ animated: Bool) {
mm_drawerController.centerViewController.view.endEditing(true)
}
Here is what I'm getting
I had the same problem. I sort of solved it for my by resigning the first responder before opening the drawers via the buttons. For the gestures, I used setDrawerVisualStateBlock
like this:
// Hide the keyboard when fully opened.
if (percentVisible >= 1.0) {
dispatch_after(DISPATCH_TIME_NOW, dispatch_get_main_queue(), ^{
[APUtils findAndResignFirstReponder];
});
}