Skip to content
New issue

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

Keyboard is not hiding #506

Open
mrugeshtank opened this issue Mar 9, 2018 · 1 comment
Open

Keyboard is not hiding #506

mrugeshtank opened this issue Mar 9, 2018 · 1 comment

Comments

@mrugeshtank
Copy link

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

sidemenu

@nfranke
Copy link

nfranke commented Jun 1, 2018

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];
            });
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants