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

hidden keyboard when open menu #19

Closed
forsan opened this issue Mar 19, 2013 · 6 comments
Closed

hidden keyboard when open menu #19

forsan opened this issue Mar 19, 2013 · 6 comments
Assignees

Comments

@forsan
Copy link

forsan commented Mar 19, 2013

hello thank for amazing framework

i have problem, when use textfield in view and keyboard rise up and go to menu... the keyboard doesnt hidden... and its still appear

check image attached

iOS Simulator Screen shot Mar 19 2013 8 23 03 AM

@gresrun
Copy link
Owner

gresrun commented Mar 19, 2013

I'm not certain of what you are reporting. Do you want to resignFirstResponder when you open the menu?

@ghost ghost assigned gresrun Mar 19, 2013
@forsan
Copy link
Author

forsan commented Mar 19, 2013

Yes, wanna hidden keyboard when open menu...

@gresrun
Copy link
Owner

gresrun commented Mar 19, 2013

Well, I'm going to assume you started with my demo code since you haven't given me any code to work with here...

In GHAppDelegate.m, the revealBlock is called when a user taps the menu button so you could add a line to dismiss the current responder before opening the menu like so:

RevealBlock revealBlock = ^(){
    [self.revealController.view endEditing:YES]; // This is the line that will dismiss the current responder
    [self.revealController toggleSidebar:!self.revealController.sidebarShowing 
                                duration:kGHRevealSidebarDefaultAnimationDuration];
};

@forsan
Copy link
Author

forsan commented Mar 19, 2013

thank you its work correctly when press to button (revealSidebar method).
but when use Gesture in Navigation (drag to right to open menu) the keyboard still appear...

@forsan
Copy link
Author

forsan commented Mar 19, 2013

i added [self.view endEditing:YES]; to this method - (void)dragContentView:(UIPanGestureRecognizer *)panGesture and work correctly also..

thank you again 👍

@gresrun
Copy link
Owner

gresrun commented Mar 19, 2013

No problem; glad to help!

@gresrun gresrun closed this as completed Mar 19, 2013
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