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

Hide keyboard on touches outside textfield #14

Closed
saqib-saud opened this issue Dec 20, 2013 · 7 comments
Closed

Hide keyboard on touches outside textfield #14

saqib-saud opened this issue Dec 20, 2013 · 7 comments

Comments

@saqib-saud
Copy link

Can you add hide keyboard functionality when touches being outside textfield?

@hackiftekhar
Copy link
Owner

May be I can add, but I think this is technically wrong to hide keyboard on touching outside of textField/textView. That's why I added UIToolbar functionality with 'Done' button to hide keyboard, I thinked this is the standard way to hide keyboard on Done click.

@elgs
Copy link

elgs commented Dec 22, 2013

@wisesabre it can be done using the following code:

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    [[self view] endEditing:YES];
}

I'm wondering why iPhone is not like iPad having a hide-keyboard key by default?

@hackiftekhar
Copy link
Owner

This method is available on UIResponder class. I do not having any control over this function through IQKeyboardManager class.

@saqib-saud
Copy link
Author

Thanks Guys,

I'll look into this.

Regards,

Saqib Saud
http://wisesabre.tumblr.com

On Sun, Dec 22, 2013 at 11:08 PM, elgs [email protected] wrote:

@wisesabre https://github.com/wisesabre it can be done using the
following code:

  • (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
    [[self view] endEditing:YES];}

I'm wondering why iPhone is not iPad having a hide-keyboard key by default?


Reply to this email directly or view it on GitHubhttps://github.com//issues/14#issuecomment-31092373
.

@hackiftekhar
Copy link
Owner

Thanks for suggesting me new things. I will look into this if i will be able to do this.

@hackiftekhar
Copy link
Owner

Thanks for the new thought. I added a new boolean 'shouldResignOnTouchOutside'. Set it to yes to resign keyboard on touching outside of textField/textView.

Best
Iftekhar

@saqib-saud
Copy link
Author

Thanks :)

Regards,

Saqib Saud
http://wisesabre.tumblr.com

On Mon, Dec 23, 2013 at 11:27 PM, Mohd Iftekhar Qurashi <
[email protected]> wrote:

Thanks for the new thought. I added a new boolean
'shouldResignOnTouchOutside'. Set it to yes to resign keyboard on touching
outside of textField/textView.

Best
Iftekhar


Reply to this email directly or view it on GitHubhttps://github.com//issues/14#issuecomment-31135266
.

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

No branches or pull requests

3 participants