Hide keyboard on touches outside textfield
saqib-saud opened this issue · comments
Can you add hide keyboard functionality when touches being outside textfield?
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.
@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?
This method is available on UIResponder class. I do not having any control over this function through IQKeyboardManager class.
Thanks Guys,
I'll look into this.
Regards,
Saqib Saud
http://wisesabre.tumblr.com
On Sun, Dec 22, 2013 at 11:08 PM, elgs notifications@github.com 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
.
Thanks for suggesting me new things. I will look into this if i will be able to do this.
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
Thanks :)
Regards,
Saqib Saud
http://wisesabre.tumblr.com
On Mon, Dec 23, 2013 at 11:27 PM, Mohd Iftekhar Qurashi <
notifications@github.com> 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
.